diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 436ebfd575..f951885c07 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -699,6 +699,7 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference ) []( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector, PCB_SELECTION_TOOL* sTool ) { sTool->FilterCollectorForMarkers( aCollector ); + sTool->FilterCollectorForHierarchy( aCollector, true ); }, // Prompt user regarding locked items if in board editor and in free-pad-mode (if // we're not in free-pad mode we delay this until the second RequestSelection()). @@ -720,6 +721,7 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference ) []( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector, PCB_SELECTION_TOOL* sTool ) { sTool->FilterCollectorForMarkers( aCollector ); + sTool->FilterCollectorForHierarchy( aCollector, true ); sTool->FilterCollectorForFreePads( aCollector ); }, true /* prompt user regarding locked items */ ); @@ -1068,6 +1070,7 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference ) m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &orig_items ); editFrame->PopTool( tool ); + editFrame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW ); return restore_state ? -1 : 0; } @@ -1419,6 +1422,7 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent ) PCB_SELECTION& selection = m_selectionTool->RequestSelection( []( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector, PCB_SELECTION_TOOL* sTool ) { + sTool->FilterCollectorForHierarchy( aCollector, true ); sTool->FilterCollectorForMarkers( aCollector ); }, // Prompt user regarding locked items if in board editor and in free-pad-mode (if diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index 86a3770ec9..c85b118f61 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -551,9 +551,7 @@ PCB_SELECTION& PCB_SELECTION_TOOL::RequestSelection( CLIENT_SELECTION_FILTER aCl DISPOSITION disposition = itemDisposition.second; if( disposition == BEFORE ) - { unhighlight( item, SELECTED, &m_selection ); - } } for( std::pair itemDisposition : itemDispositions ) @@ -561,14 +559,10 @@ PCB_SELECTION& PCB_SELECTION_TOOL::RequestSelection( CLIENT_SELECTION_FILTER aCl BOARD_ITEM* item = static_cast( itemDisposition.first ); DISPOSITION disposition = itemDisposition.second; - if( disposition == AFTER ) - { + // Note that we must re-highlight even previously-highlighted items + // (ie: disposition BOTH) in case we removed any of their children. + if( disposition == AFTER || disposition == BOTH ) highlight( item, SELECTED, &m_selection ); - } - else if( disposition == BOTH ) - { - // nothing to do - } } m_frame->GetCanvas()->ForceRefresh();