diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index f567fa0961..16e22beaf8 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -439,8 +439,14 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) } for( auto item : selection ) + { item->SetFlags( IS_DRAGGED ); //todo: flags structure rework + if( auto module = dyn_cast( item ) ) + module->RunOnChildren( [&] ( BOARD_ITEM* bitem ) + { bitem->SetFlags( IS_DRAGGED ); } ); + } + editFrame->UndoRedoBlock( true ); m_cursor = controls->GetCursorPosition(); @@ -562,8 +568,14 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true ); for( auto item : selection ) + { item->ClearFlags( IS_DRAGGED ); //todo: flags structure rework + if( auto module = dyn_cast( item ) ) + module->RunOnChildren( [&] ( BOARD_ITEM* bitem ) + { bitem->SetFlags( IS_DRAGGED ); } ); + } + if( restore_state ) m_commit->Revert(); else