Loading pcbnew/tools/placement_tool.cpp +10 −1 Original line number Original line Diff line number Diff line Loading @@ -54,7 +54,16 @@ bool PLACEMENT_TOOL::Init() return false; return false; } } // TODO create a context menu and add it to the selection tool // Create a context menu and make it available through selection tool CONTEXT_MENU* menu = new CONTEXT_MENU; menu->Add( COMMON_ACTIONS::alignTop ); menu->Add( COMMON_ACTIONS::alignBottom ); menu->Add( COMMON_ACTIONS::alignLeft ); menu->Add( COMMON_ACTIONS::alignRight ); menu->AppendSeparator(); menu->Add( COMMON_ACTIONS::distributeHorizontally ); menu->Add( COMMON_ACTIONS::distributeVertically ); m_selectionTool->AddSubMenu( menu, wxString( "Placement" ) ); setTransitions(); setTransitions(); Loading pcbnew/tools/selection_tool.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -198,6 +198,12 @@ void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) } } void SELECTION_TOOL::AddSubMenu( CONTEXT_MENU* aMenu, const wxString& aLabel ) { m_menu.AppendSubMenu( aMenu, aLabel ); } void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) { { if( aItem->IsSelected() ) if( aItem->IsSelected() ) Loading pcbnew/tools/selection_tool.h +9 −0 Original line number Original line Diff line number Diff line Loading @@ -122,6 +122,15 @@ public: */ */ void AddMenuItem( const TOOL_ACTION& aAction ); void AddMenuItem( const TOOL_ACTION& aAction ); /** * Function AddSubMenu() * * Adds a submenu to the selection tool right-click context menu. * @param aMenu is the submenu to be added. * @param aLabel is the label of added submenu. */ void AddSubMenu( CONTEXT_MENU* aMenu, const wxString& aLabel ); /** /** * Function EditModules() * Function EditModules() * Toggles edit module mode. When enabled, one may select parts of modules individually * Toggles edit module mode. When enabled, one may select parts of modules individually Loading pcbnew/router/router_tool.cpp +1 −1 File changed.Contains only whitespace changes. Show changes Loading
pcbnew/tools/placement_tool.cpp +10 −1 Original line number Original line Diff line number Diff line Loading @@ -54,7 +54,16 @@ bool PLACEMENT_TOOL::Init() return false; return false; } } // TODO create a context menu and add it to the selection tool // Create a context menu and make it available through selection tool CONTEXT_MENU* menu = new CONTEXT_MENU; menu->Add( COMMON_ACTIONS::alignTop ); menu->Add( COMMON_ACTIONS::alignBottom ); menu->Add( COMMON_ACTIONS::alignLeft ); menu->Add( COMMON_ACTIONS::alignRight ); menu->AppendSeparator(); menu->Add( COMMON_ACTIONS::distributeHorizontally ); menu->Add( COMMON_ACTIONS::distributeVertically ); m_selectionTool->AddSubMenu( menu, wxString( "Placement" ) ); setTransitions(); setTransitions(); Loading
pcbnew/tools/selection_tool.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -198,6 +198,12 @@ void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) } } void SELECTION_TOOL::AddSubMenu( CONTEXT_MENU* aMenu, const wxString& aLabel ) { m_menu.AppendSubMenu( aMenu, aLabel ); } void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) { { if( aItem->IsSelected() ) if( aItem->IsSelected() ) Loading
pcbnew/tools/selection_tool.h +9 −0 Original line number Original line Diff line number Diff line Loading @@ -122,6 +122,15 @@ public: */ */ void AddMenuItem( const TOOL_ACTION& aAction ); void AddMenuItem( const TOOL_ACTION& aAction ); /** * Function AddSubMenu() * * Adds a submenu to the selection tool right-click context menu. * @param aMenu is the submenu to be added. * @param aLabel is the label of added submenu. */ void AddSubMenu( CONTEXT_MENU* aMenu, const wxString& aLabel ); /** /** * Function EditModules() * Function EditModules() * Toggles edit module mode. When enabled, one may select parts of modules individually * Toggles edit module mode. When enabled, one may select parts of modules individually Loading