Implement undo/redo for footprint children.

Our special-cases to handle the fact that we didn't do this had far
outgrown the code necessary to actually handle it.
This commit is contained in:
Jeff Young
2023-07-15 17:37:31 +01:00
parent 3233bbe0ba
commit 1218f61d0a
16 changed files with 276 additions and 654 deletions
+6 -6
View File
@@ -32,6 +32,7 @@
#include <vector>
#include <wx/string.h>
#include <undo_redo_container.h>
#include <kiid.h>
class EDA_ITEM;
class BASE_SCREEN;
@@ -43,9 +44,7 @@ enum CHANGE_TYPE {
CHT_MODIFY = 4,
CHT_TYPE = CHT_ADD | CHT_REMOVE | CHT_MODIFY,
///< Flag to indicate the change is already applied,
///< just notify observers (not compatible with CHT_MODIFY)
CHT_DONE = 8,
CHT_DONE = 8, ///< Flag to indicate the change is already applied
CHT_FLAGS = CHT_DONE
};
@@ -151,9 +150,10 @@ public:
protected:
struct COMMIT_LINE
{
EDA_ITEM* m_item; ///< Main item that is added/deleted/modified
EDA_ITEM* m_copy; ///< Optional copy of the item
CHANGE_TYPE m_type; ///< Modification type
EDA_ITEM* m_item; ///< Main item that is added/deleted/modified
EDA_ITEM* m_copy; ///< Optional copy of the item
CHANGE_TYPE m_type; ///< Modification type
KIID m_parent = NilUuid(); ///< Parent item (primarily for undo of deleted items)
BASE_SCREEN* m_screen;
};