Add undo / redo support for macros
Some checks failed
debian-build / build (push) Has been cancelled
Check locale / ubuntu64 (push) Has been cancelled
Push to master / Check Formatting 🔍 (push) Has been cancelled
Push to master / Build Project 🧱 (push) Has been cancelled
Push to master / Create Release 🛫 (push) Has been cancelled

This commit is contained in:
WarmUpTill
2026-08-12 11:48:53 +02:00
committed by WarmUpTill
parent afd9154c84
commit 7ea944e1a3
17 changed files with 1768 additions and 20 deletions

View File

@@ -1,4 +1,5 @@
#include "macro-tree.hpp"
#include "macro-undo-redo.hpp"
#include "macro-helpers.hpp"
#include "macro-search.hpp"
@@ -824,6 +825,8 @@ void MacroTreeModel::GroupSelectedItems(QModelIndexList &indices)
Reset(_macros);
assert(IsInValidState());
RegisterGroupCreateUndoRedo(name.toStdString());
}
void MacroTreeModel::UngroupSelectedGroups(QModelIndexList &indices)
@@ -837,6 +840,7 @@ void MacroTreeModel::UngroupSelectedGroups(QModelIndexList &indices)
std::shared_ptr<Macro> item = _macros[ModelIndexToMacroIndex(
indices[i].row(), _macros)];
if (item->IsGroup()) {
RegisterGroupRemoveUndoRedo(item->Name());
Macro::RemoveGroup(item);
}
}