From 3696064f6f597f2e2f0ce1f616c7f5398102dd0f Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sat, 15 Aug 2020 13:15:04 -0400 Subject: [PATCH] Don't post update events twice and on motion for movement of items Fix #4880 Fix #4741 (hopefully) --- pcbnew/tools/edit_tool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index bf887328a3..4c387ce21d 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -436,8 +436,6 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, bool aPickReference ) if( !item->GetParent() || !item->GetParent()->IsSelected() ) static_cast( item )->Move( movement ); } - - frame()->UpdateMsgPanel(); } else if( !m_dragging ) // Prepare to start dragging { @@ -548,9 +546,11 @@ 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 ); } - m_toolMgr->PostEvent( EVENTS::SelectedItemsModified ); m_toolMgr->RunAction( PCB_ACTIONS::updateLocalRatsnest, false, new VECTOR2I( movement ) ); }