Remove excess calls to SelectedItemsModified

We really don't want to post these events unless the *selected* items
were actually modified, since it results in a redraw of the properties
panel (which disturbs edit state and causes flicker on MSW).

Now the COMMIT system is responsible for sending this event iff the
commit touches items that are selected.

Side note: UpdateMsgPanel is useless on every app except pl_editor, so
it can probably be refactored/removed at some point.
This commit is contained in:
Jon Evans
2022-12-26 20:57:58 -05:00
parent 5eb3f5d3e7
commit ee0a41e3bc
7 changed files with 9 additions and 11 deletions
+7
View File
@@ -171,6 +171,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
bool itemsDeselected = false;
bool solderMaskDirty = false;
bool autofillZones = false;
bool selectedModified = false;
if( Empty() )
return;
@@ -244,6 +245,9 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
solderMaskDirty = true;
}
if( boardItem->IsSelected() )
selectedModified = true;
switch( changeType )
{
case CHT_ADD:
@@ -570,6 +574,9 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
if( autofillZones )
m_toolMgr->RunAction( PCB_ACTIONS::zoneFillDirty );
if( selectedModified )
m_toolMgr->ProcessEvent( EVENTS::SelectedItemsModified );
if( frame )
{
if( !( aCommitFlags & SKIP_SET_DIRTY ) )