Split selecteditemmodified to a selecteditemmoved to reduce updatemsgpanel spam
This commit is contained in:
parent
3696064f6f
commit
a417da4ce0
|
@ -623,4 +623,5 @@ const TOOL_EVENT EVENTS::UnselectedEvent( TC_MESSAGE, TA_ACTION, "common.Interac
|
|||
const TOOL_EVENT EVENTS::ClearedEvent( TC_MESSAGE, TA_ACTION, "common.Interactive.cleared" );
|
||||
|
||||
const TOOL_EVENT EVENTS::SelectedItemsModified( TC_MESSAGE, TA_ACTION, "common.Interactive.modified" );
|
||||
const TOOL_EVENT EVENTS::SelectedItemsMoved( TC_MESSAGE, TA_ACTION, "common.Interactive.moved" );
|
||||
|
||||
|
|
|
@ -204,7 +204,11 @@ public:
|
|||
const static TOOL_EVENT UnselectedEvent;
|
||||
const static TOOL_EVENT ClearedEvent;
|
||||
|
||||
//< Selected item had a property changed (except movement)
|
||||
const static TOOL_EVENT SelectedItemsModified;
|
||||
|
||||
//< Selected items were moved, this can be very high frequency on the canvas, use with care
|
||||
const static TOOL_EVENT SelectedItemsMoved;
|
||||
};
|
||||
|
||||
#endif // __ACTIONS_H
|
||||
|
|
|
@ -436,6 +436,8 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, bool aPickReference )
|
|||
if( !item->GetParent() || !item->GetParent()->IsSelected() )
|
||||
static_cast<BOARD_ITEM*>( item )->Move( movement );
|
||||
}
|
||||
|
||||
m_toolMgr->PostEvent( EVENTS::SelectedItemsMoved );
|
||||
}
|
||||
else if( !m_dragging ) // Prepare to start dragging
|
||||
{
|
||||
|
@ -546,8 +548,6 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, bool aPickReference )
|
|||
|
||||
prevPos = m_cursor;
|
||||
controls->SetAutoPan( true );
|
||||
|
||||
// only post event while we arent dragging
|
||||
m_toolMgr->PostEvent( EVENTS::SelectedItemsModified );
|
||||
}
|
||||
|
||||
|
|
|
@ -2606,4 +2606,5 @@ void SELECTION_TOOL::setTransitions()
|
|||
Go( &SELECTION_TOOL::selectSameSheet, PCB_ACTIONS::selectSameSheet.MakeEvent() );
|
||||
Go( &SELECTION_TOOL::selectSheetContents, PCB_ACTIONS::selectOnSheetFromEeschema.MakeEvent() );
|
||||
Go( &SELECTION_TOOL::updateSelection, EVENTS::SelectedItemsModified );
|
||||
Go( &SELECTION_TOOL::updateSelection, EVENTS::SelectedItemsMoved );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue