Loading pcbnew/tools/edit_tool.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ bool EDIT_TOOL::Init() int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); // Shall the selection be cleared at the end? bool unselect = selection.Empty(); Loading Loading @@ -218,7 +218,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>(); if( !makeSelection( selection ) ) Loading Loading @@ -287,7 +287,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>(); // Shall the selection be cleared at the end? Loading Loading @@ -341,7 +341,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); PCB_BASE_FRAME* editFrame = getEditFrame<PCB_BASE_FRAME>(); // Shall the selection be cleared at the end? Loading Loading @@ -395,7 +395,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( !makeSelection( selection ) ) { Loading Loading @@ -522,7 +522,7 @@ void EDIT_TOOL::setTransitions() void EDIT_TOOL::updateRatsnest( bool aRedraw ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); RN_DATA* ratsnest = getModel<BOARD>()->GetRatsnest(); ratsnest->ClearSimple(); Loading @@ -538,7 +538,7 @@ void EDIT_TOOL::updateRatsnest( bool aRedraw ) } wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelection ) wxPoint EDIT_TOOL::getModificationPoint( const SELECTION& aSelection ) { if( aSelection.Size() == 1 ) { Loading @@ -556,7 +556,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec } bool EDIT_TOOL::makeSelection( const SELECTION_TOOL::SELECTION& aSelection ) bool EDIT_TOOL::makeSelection( const SELECTION& aSelection ) { if( aSelection.Empty() ) // Try to find an item that could be modified m_toolMgr->RunAction( COMMON_ACTIONS::selectionSingle ); Loading pcbnew/tools/edit_tool.h +2 −2 Original line number Diff line number Diff line Loading @@ -143,11 +143,11 @@ private: ///> Returns the right modification point (e.g. for rotation), depending on the number of ///> selected items. wxPoint getModificationPoint( const SELECTION_TOOL::SELECTION& aSelection ); wxPoint getModificationPoint( const SELECTION& aSelection ); ///> If there are no items currently selected, it tries to choose the item that is under ///> the cursor or displays a disambiguation menu if there are multpile items. bool makeSelection( const SELECTION_TOOL::SELECTION& aSelection ); bool makeSelection( const SELECTION& aSelection ); ///> Updates view with the changes in the list. void processChanges( const PICKED_ITEMS_LIST* aList ); Loading pcbnew/tools/module_tools.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -329,7 +329,7 @@ int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent ) int MODULE_TOOLS::CopyItems( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_toolMgr->GetTool<SELECTION_TOOL>()->GetSelection(); const SELECTION& selection = m_toolMgr->GetTool<SELECTION_TOOL>()->GetSelection(); Activate(); Loading pcbnew/tools/placement_tool.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ bool PLACEMENT_TOOL::Init() int PLACEMENT_TOOL::AlignTop( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading Loading @@ -116,7 +116,7 @@ int PLACEMENT_TOOL::AlignTop( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::AlignBottom( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading Loading @@ -159,7 +159,7 @@ int PLACEMENT_TOOL::AlignBottom( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::AlignLeft( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading Loading @@ -202,7 +202,7 @@ int PLACEMENT_TOOL::AlignLeft( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::AlignRight( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading Loading @@ -257,7 +257,7 @@ static bool compareY( const BOARD_ITEM* aA, const BOARD_ITEM* aB ) int PLACEMENT_TOOL::DistributeHorizontally( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading Loading @@ -306,7 +306,7 @@ int PLACEMENT_TOOL::DistributeHorizontally( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::DistributeVertically( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading pcbnew/tools/point_editor.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ bool POINT_EDITOR::Init() int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() == 1 ) { Loading Loading @@ -666,7 +666,7 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) { EDA_ITEM* item = m_editPoints->GetParent(); const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( item->Type() == PCB_ZONE_AREA_T ) { Loading Loading
pcbnew/tools/edit_tool.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ bool EDIT_TOOL::Init() int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); // Shall the selection be cleared at the end? bool unselect = selection.Empty(); Loading Loading @@ -218,7 +218,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>(); if( !makeSelection( selection ) ) Loading Loading @@ -287,7 +287,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>(); // Shall the selection be cleared at the end? Loading Loading @@ -341,7 +341,7 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent ) int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); PCB_BASE_FRAME* editFrame = getEditFrame<PCB_BASE_FRAME>(); // Shall the selection be cleared at the end? Loading Loading @@ -395,7 +395,7 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent ) int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( !makeSelection( selection ) ) { Loading Loading @@ -522,7 +522,7 @@ void EDIT_TOOL::setTransitions() void EDIT_TOOL::updateRatsnest( bool aRedraw ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); RN_DATA* ratsnest = getModel<BOARD>()->GetRatsnest(); ratsnest->ClearSimple(); Loading @@ -538,7 +538,7 @@ void EDIT_TOOL::updateRatsnest( bool aRedraw ) } wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelection ) wxPoint EDIT_TOOL::getModificationPoint( const SELECTION& aSelection ) { if( aSelection.Size() == 1 ) { Loading @@ -556,7 +556,7 @@ wxPoint EDIT_TOOL::getModificationPoint( const SELECTION_TOOL::SELECTION& aSelec } bool EDIT_TOOL::makeSelection( const SELECTION_TOOL::SELECTION& aSelection ) bool EDIT_TOOL::makeSelection( const SELECTION& aSelection ) { if( aSelection.Empty() ) // Try to find an item that could be modified m_toolMgr->RunAction( COMMON_ACTIONS::selectionSingle ); Loading
pcbnew/tools/edit_tool.h +2 −2 Original line number Diff line number Diff line Loading @@ -143,11 +143,11 @@ private: ///> Returns the right modification point (e.g. for rotation), depending on the number of ///> selected items. wxPoint getModificationPoint( const SELECTION_TOOL::SELECTION& aSelection ); wxPoint getModificationPoint( const SELECTION& aSelection ); ///> If there are no items currently selected, it tries to choose the item that is under ///> the cursor or displays a disambiguation menu if there are multpile items. bool makeSelection( const SELECTION_TOOL::SELECTION& aSelection ); bool makeSelection( const SELECTION& aSelection ); ///> Updates view with the changes in the list. void processChanges( const PICKED_ITEMS_LIST* aList ); Loading
pcbnew/tools/module_tools.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -329,7 +329,7 @@ int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent ) int MODULE_TOOLS::CopyItems( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_toolMgr->GetTool<SELECTION_TOOL>()->GetSelection(); const SELECTION& selection = m_toolMgr->GetTool<SELECTION_TOOL>()->GetSelection(); Activate(); Loading
pcbnew/tools/placement_tool.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ bool PLACEMENT_TOOL::Init() int PLACEMENT_TOOL::AlignTop( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading Loading @@ -116,7 +116,7 @@ int PLACEMENT_TOOL::AlignTop( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::AlignBottom( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading Loading @@ -159,7 +159,7 @@ int PLACEMENT_TOOL::AlignBottom( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::AlignLeft( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading Loading @@ -202,7 +202,7 @@ int PLACEMENT_TOOL::AlignLeft( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::AlignRight( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading Loading @@ -257,7 +257,7 @@ static bool compareY( const BOARD_ITEM* aA, const BOARD_ITEM* aB ) int PLACEMENT_TOOL::DistributeHorizontally( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading Loading @@ -306,7 +306,7 @@ int PLACEMENT_TOOL::DistributeHorizontally( TOOL_EVENT& aEvent ) int PLACEMENT_TOOL::DistributeVertically( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() > 1 ) { Loading
pcbnew/tools/point_editor.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ bool POINT_EDITOR::Init() int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Size() == 1 ) { Loading Loading @@ -666,7 +666,7 @@ EDIT_POINT POINT_EDITOR::get45DegConstrainer() const void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) { EDA_ITEM* item = m_editPoints->GetParent(); const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection(); if( item->Type() == PCB_ZONE_AREA_T ) { Loading