Implement Editor::abort_reversible_selection_op

This commit is contained in:
Robin Gareus 2023-06-01 21:37:18 +02:00
parent 6016c9624e
commit c063be6a76
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 12 additions and 0 deletions

View File

@ -3671,6 +3671,17 @@ Editor::begin_reversible_selection_op (string name)
}
}
void
Editor::abort_reversible_selection_op ()
{
if (!_session) {
return;
}
if (selection_op_cmd_depth > 0) {
selection_op_cmd_depth--;
}
}
void
Editor::commit_reversible_selection_op ()
{

View File

@ -510,6 +510,7 @@ public:
void begin_selection_op_history ();
void begin_reversible_selection_op (std::string cmd_name);
void commit_reversible_selection_op ();
void abort_reversible_selection_op ();
void undo_selection_op ();
void redo_selection_op ();
void begin_reversible_command (std::string cmd_name);