Loading pcbnew/CMakeLists.txt +3 −0 Original line number Original line Diff line number Diff line Loading @@ -284,6 +284,9 @@ set( PCBNEW_CLASS_SRCS tools/common_actions.cpp tools/common_actions.cpp tools/grid_helper.cpp tools/grid_helper.cpp tools/tools_common.cpp tools/tools_common.cpp tools/grid_menu.cpp tools/zoom_menu.cpp ) ) set( PCBNEW_SRCS ${PCBNEW_AUTOROUTER_SRCS} ${PCBNEW_CLASS_SRCS} ${PCBNEW_DIALOGS} ) set( PCBNEW_SRCS ${PCBNEW_AUTOROUTER_SRCS} ${PCBNEW_CLASS_SRCS} ${PCBNEW_DIALOGS} ) Loading pcbnew/tools/selection_tool.cpp +23 −5 Original line number Original line Diff line number Diff line Loading @@ -51,6 +51,8 @@ #include "selection_tool.h" #include "selection_tool.h" #include "selection_area.h" #include "selection_area.h" #include "zoom_menu.h" #include "grid_menu.h" #include "bright_box.h" #include "bright_box.h" #include "common_actions.h" #include "common_actions.h" Loading @@ -69,6 +71,18 @@ SELECTION_TOOL::SELECTION_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_frame( NULL ), m_additive( false ), m_multiple( false ), m_frame( NULL ), m_additive( false ), m_multiple( false ), m_editModules( false ), m_locked( true ) m_editModules( false ), m_locked( true ) { } SELECTION_TOOL::~SELECTION_TOOL() { delete m_selArea; delete m_selection.group; } bool SELECTION_TOOL::Init() { { m_selArea = new SELECTION_AREA; m_selArea = new SELECTION_AREA; m_selection.group = new KIGFX::VIEW_GROUP; m_selection.group = new KIGFX::VIEW_GROUP; Loading @@ -76,13 +90,17 @@ SELECTION_TOOL::SELECTION_TOOL() : AddSubMenu( new SELECT_MENU, _( "Select..." ), AddSubMenu( new SELECT_MENU, _( "Select..." ), (SELECTION_CONDITION) SELECTION_CONDITIONS::OnlyConnectedItems && (SELECTION_CONDITION) SELECTION_CONDITIONS::OnlyConnectedItems && SELECTION_CONDITIONS::Count( 1 ) ); SELECTION_CONDITIONS::Count( 1 ) ); } AddMenuItem( COMMON_ACTIONS::zoomCenter ); AddMenuItem( COMMON_ACTIONS::zoomIn ); AddMenuItem( COMMON_ACTIONS::zoomOut ); AddMenuItem( COMMON_ACTIONS::zoomFitScreen ); SELECTION_TOOL::~SELECTION_TOOL() AddSubMenu( new ZOOM_MENU( getEditFrame<PCB_BASE_FRAME>() ), "Zoom" ); { delete m_selArea; AddSubMenu( new GRID_MENU( getEditFrame<PCB_BASE_FRAME>() ), "Grid" ); delete m_selection.group; return true; } } Loading pcbnew/tools/selection_tool.h +4 −1 Original line number Original line Diff line number Diff line Loading @@ -104,7 +104,10 @@ public: SELECTION_TOOL(); SELECTION_TOOL(); ~SELECTION_TOOL(); ~SELECTION_TOOL(); /// @copydoc TOOL_INTERACTIVE::Reset() /// @copydoc TOOL_BASE::Init() bool Init(); /// @copydoc TOOL_BASE::Reset() void Reset( RESET_REASON aReason ); void Reset( RESET_REASON aReason ); /** /** Loading Loading
pcbnew/CMakeLists.txt +3 −0 Original line number Original line Diff line number Diff line Loading @@ -284,6 +284,9 @@ set( PCBNEW_CLASS_SRCS tools/common_actions.cpp tools/common_actions.cpp tools/grid_helper.cpp tools/grid_helper.cpp tools/tools_common.cpp tools/tools_common.cpp tools/grid_menu.cpp tools/zoom_menu.cpp ) ) set( PCBNEW_SRCS ${PCBNEW_AUTOROUTER_SRCS} ${PCBNEW_CLASS_SRCS} ${PCBNEW_DIALOGS} ) set( PCBNEW_SRCS ${PCBNEW_AUTOROUTER_SRCS} ${PCBNEW_CLASS_SRCS} ${PCBNEW_DIALOGS} ) Loading
pcbnew/tools/selection_tool.cpp +23 −5 Original line number Original line Diff line number Diff line Loading @@ -51,6 +51,8 @@ #include "selection_tool.h" #include "selection_tool.h" #include "selection_area.h" #include "selection_area.h" #include "zoom_menu.h" #include "grid_menu.h" #include "bright_box.h" #include "bright_box.h" #include "common_actions.h" #include "common_actions.h" Loading @@ -69,6 +71,18 @@ SELECTION_TOOL::SELECTION_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_frame( NULL ), m_additive( false ), m_multiple( false ), m_frame( NULL ), m_additive( false ), m_multiple( false ), m_editModules( false ), m_locked( true ) m_editModules( false ), m_locked( true ) { } SELECTION_TOOL::~SELECTION_TOOL() { delete m_selArea; delete m_selection.group; } bool SELECTION_TOOL::Init() { { m_selArea = new SELECTION_AREA; m_selArea = new SELECTION_AREA; m_selection.group = new KIGFX::VIEW_GROUP; m_selection.group = new KIGFX::VIEW_GROUP; Loading @@ -76,13 +90,17 @@ SELECTION_TOOL::SELECTION_TOOL() : AddSubMenu( new SELECT_MENU, _( "Select..." ), AddSubMenu( new SELECT_MENU, _( "Select..." ), (SELECTION_CONDITION) SELECTION_CONDITIONS::OnlyConnectedItems && (SELECTION_CONDITION) SELECTION_CONDITIONS::OnlyConnectedItems && SELECTION_CONDITIONS::Count( 1 ) ); SELECTION_CONDITIONS::Count( 1 ) ); } AddMenuItem( COMMON_ACTIONS::zoomCenter ); AddMenuItem( COMMON_ACTIONS::zoomIn ); AddMenuItem( COMMON_ACTIONS::zoomOut ); AddMenuItem( COMMON_ACTIONS::zoomFitScreen ); SELECTION_TOOL::~SELECTION_TOOL() AddSubMenu( new ZOOM_MENU( getEditFrame<PCB_BASE_FRAME>() ), "Zoom" ); { delete m_selArea; AddSubMenu( new GRID_MENU( getEditFrame<PCB_BASE_FRAME>() ), "Grid" ); delete m_selection.group; return true; } } Loading
pcbnew/tools/selection_tool.h +4 −1 Original line number Original line Diff line number Diff line Loading @@ -104,7 +104,10 @@ public: SELECTION_TOOL(); SELECTION_TOOL(); ~SELECTION_TOOL(); ~SELECTION_TOOL(); /// @copydoc TOOL_INTERACTIVE::Reset() /// @copydoc TOOL_BASE::Init() bool Init(); /// @copydoc TOOL_BASE::Reset() void Reset( RESET_REASON aReason ); void Reset( RESET_REASON aReason ); /** /** Loading