UI: Do not allow new undo actions while undo disabled
This commit is contained in:
parent
008a7372d3
commit
64cd451def
@ -34,6 +34,9 @@ void undo_stack::add_action(const QString &name, undo_redo_cb undo,
|
||||
undo_redo_cb redo, std::string undo_data,
|
||||
std::string redo_data, bool repeatable)
|
||||
{
|
||||
if (!is_enabled())
|
||||
return;
|
||||
|
||||
while (undo_items.size() >= MAX_STACK_SIZE) {
|
||||
undo_redo_t item = undo_items.back();
|
||||
undo_items.pop_back();
|
||||
|
Loading…
x
Reference in New Issue
Block a user