Loading common/tool/tool_manager.cpp +9 −3 Original line number Original line Diff line number Diff line Loading @@ -222,5 +222,11 @@ void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, m_view = aView; m_view = aView; m_viewControls = aViewControls; m_viewControls = aViewControls; m_editFrame = aFrame; m_editFrame = aFrame; // fixme: reset tools after changing environment // Reset state of the registered tools BOOST_FOREACH( TOOL_BASE* tool, m_toolState | boost::adaptors::map_keys ) { if( tool->GetType() == TOOL_Interactive ) static_cast<TOOL_INTERACTIVE*>( tool )->Reset(); } } } include/tool/tool_manager.h +3 −4 Original line number Original line Diff line number Diff line Loading @@ -78,7 +78,6 @@ public: template <class Parameters> template <class Parameters> void InvokeTool( const std::string& name, const Parameters& aToolParams ); void InvokeTool( const std::string& name, const Parameters& aToolParams ); /** /** * Function FindTool() * Function FindTool() * Searches for a tool with given name or ID * Searches for a tool with given name or ID Loading pcbnew/tools/selection_tool.cpp +2 −0 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,8 @@ SELECTION_TOOL::~SELECTION_TOOL() void SELECTION_TOOL::Reset() void SELECTION_TOOL::Reset() { { m_selectedItems.clear(); // the tool launches upon reception of activate ("pcbnew.InteractiveSelection") // the tool launches upon reception of activate ("pcbnew.InteractiveSelection") Go( &SELECTION_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); //"pcbnew.InteractiveSelection")); Go( &SELECTION_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); //"pcbnew.InteractiveSelection")); } } Loading Loading
common/tool/tool_manager.cpp +9 −3 Original line number Original line Diff line number Diff line Loading @@ -222,5 +222,11 @@ void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, m_view = aView; m_view = aView; m_viewControls = aViewControls; m_viewControls = aViewControls; m_editFrame = aFrame; m_editFrame = aFrame; // fixme: reset tools after changing environment // Reset state of the registered tools BOOST_FOREACH( TOOL_BASE* tool, m_toolState | boost::adaptors::map_keys ) { if( tool->GetType() == TOOL_Interactive ) static_cast<TOOL_INTERACTIVE*>( tool )->Reset(); } } }
include/tool/tool_manager.h +3 −4 Original line number Original line Diff line number Diff line Loading @@ -78,7 +78,6 @@ public: template <class Parameters> template <class Parameters> void InvokeTool( const std::string& name, const Parameters& aToolParams ); void InvokeTool( const std::string& name, const Parameters& aToolParams ); /** /** * Function FindTool() * Function FindTool() * Searches for a tool with given name or ID * Searches for a tool with given name or ID Loading
pcbnew/tools/selection_tool.cpp +2 −0 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,8 @@ SELECTION_TOOL::~SELECTION_TOOL() void SELECTION_TOOL::Reset() void SELECTION_TOOL::Reset() { { m_selectedItems.clear(); // the tool launches upon reception of activate ("pcbnew.InteractiveSelection") // the tool launches upon reception of activate ("pcbnew.InteractiveSelection") Go( &SELECTION_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); //"pcbnew.InteractiveSelection")); Go( &SELECTION_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); //"pcbnew.InteractiveSelection")); } } Loading