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:
@@ -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 ) )
|
||||
|
||||
Reference in New Issue
Block a user