Remove EDIT_TOOL's quasi-global BOARD_COMMIT.

It had several encapsulation leakage issues, as well as poorly-defined
behaviour of undo for chained-actions (append-to-board, and then rotate
while moving, for instance).
This commit is contained in:
Jeff Young
2023-06-27 17:04:18 +01:00
parent 30f0351a33
commit 1411b09178
9 changed files with 259 additions and 339 deletions
+7
View File
@@ -571,6 +571,8 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
wxASSERT( false );
break;
}
boardItem->ClearEditFlags();
}
if( bulkAddedItems.size() > 0 )
@@ -767,6 +769,8 @@ void BOARD_COMMIT::Revert()
wxASSERT( false );
break;
}
item->ClearEditFlags();
}
if( bulkAddedItems.size() > 0 )
@@ -787,6 +791,9 @@ void BOARD_COMMIT::Revert()
PCB_SELECTION_TOOL* selTool = m_toolMgr->GetTool<PCB_SELECTION_TOOL>();
selTool->RebuildSelection();
// Property panel needs to know about the reselect
m_toolMgr->PostEvent( EVENTS::SelectedItemsModified );
clear();
}