void DeleteLine::undo(EditorModel& model)
{
    if (lines_ == 1 && model.line(1) == "")
    {
        model.line(1) = deletedLine_;
    }
    else
    {
        model.setRow(row_ - 1);
        model.insertLine(deletedLine_);
    }
    model.setRow(row_);
    model.setCol(col_);
}
Example #2
0
void DeleteLine::undo(EditorModel& model)
{
    model.movePosition(backup_line, backup_column);
    model.insertLine(backup_text);
}