Loading common/tool/action_manager.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,13 @@ ACTION_MANAGER::ACTION_MANAGER( TOOL_MANAGER* aToolManager ) : } ACTION_MANAGER::~ACTION_MANAGER() { while( !m_actionIdIndex.empty() ) UnregisterAction( m_actionIdIndex.begin()->second ); } void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) { assert( aAction->GetId() == -1 ); // Check if the TOOL_ACTION was not registered before Loading include/tool/action_manager.h +6 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,12 @@ public: */ ACTION_MANAGER( TOOL_MANAGER* aToolManager ); /** * Destructor. * Unregisters every registered action. */ ~ACTION_MANAGER(); /** * Function RegisterAction() * Adds a tool action to the manager and sets it up. After that is is possible to invoke Loading pcbnew/tools/pcb_tools.cpp +1 −6 Original line number Diff line number Diff line Loading @@ -61,13 +61,8 @@ void PCB_EDIT_FRAME::setupTools() void PCB_EDIT_FRAME::destroyTools() { m_toolManager->UnregisterAction( &COMMON_ACTIONS::moveActivate ); m_toolManager->UnregisterAction( &COMMON_ACTIONS::selectionActivate ); m_toolManager->UnregisterAction( &COMMON_ACTIONS::rotate ); m_toolManager->UnregisterAction( &COMMON_ACTIONS::flip ); delete m_toolDispatcher; delete m_toolManager; delete m_toolDispatcher; } Loading Loading
common/tool/action_manager.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,13 @@ ACTION_MANAGER::ACTION_MANAGER( TOOL_MANAGER* aToolManager ) : } ACTION_MANAGER::~ACTION_MANAGER() { while( !m_actionIdIndex.empty() ) UnregisterAction( m_actionIdIndex.begin()->second ); } void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) { assert( aAction->GetId() == -1 ); // Check if the TOOL_ACTION was not registered before Loading
include/tool/action_manager.h +6 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,12 @@ public: */ ACTION_MANAGER( TOOL_MANAGER* aToolManager ); /** * Destructor. * Unregisters every registered action. */ ~ACTION_MANAGER(); /** * Function RegisterAction() * Adds a tool action to the manager and sets it up. After that is is possible to invoke Loading
pcbnew/tools/pcb_tools.cpp +1 −6 Original line number Diff line number Diff line Loading @@ -61,13 +61,8 @@ void PCB_EDIT_FRAME::setupTools() void PCB_EDIT_FRAME::destroyTools() { m_toolManager->UnregisterAction( &COMMON_ACTIONS::moveActivate ); m_toolManager->UnregisterAction( &COMMON_ACTIONS::selectionActivate ); m_toolManager->UnregisterAction( &COMMON_ACTIONS::rotate ); m_toolManager->UnregisterAction( &COMMON_ACTIONS::flip ); delete m_toolDispatcher; delete m_toolManager; delete m_toolDispatcher; } Loading