Added missing tool initialization

This commit is contained in:
Maciej Suminski 2017-01-30 13:21:22 +01:00
parent 4b9243e0bf
commit f0e0254e27
2 changed files with 2 additions and 2 deletions

View File

@ -958,12 +958,12 @@ void FOOTPRINT_EDIT_FRAME::setupTools()
m_toolManager->RegisterTool( new MODULE_EDITOR_TOOLS ); m_toolManager->RegisterTool( new MODULE_EDITOR_TOOLS );
m_toolManager->RegisterTool( new PLACEMENT_TOOL ); m_toolManager->RegisterTool( new PLACEMENT_TOOL );
m_toolManager->RegisterTool( new PICKER_TOOL ); m_toolManager->RegisterTool( new PICKER_TOOL );
m_toolManager->InitTools();
m_toolManager->GetTool<SELECTION_TOOL>()->SetEditModules( true ); m_toolManager->GetTool<SELECTION_TOOL>()->SetEditModules( true );
m_toolManager->GetTool<EDIT_TOOL>()->SetEditModules( true ); m_toolManager->GetTool<EDIT_TOOL>()->SetEditModules( true );
m_toolManager->GetTool<DRAWING_TOOL>()->SetEditModules( true ); m_toolManager->GetTool<DRAWING_TOOL>()->SetEditModules( true );
m_toolManager->ResetTools( TOOL_BASE::RUN );
m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" ); m_toolManager->InvokeTool( "pcbnew.InteractiveSelection" );
} }

View File

@ -199,7 +199,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
drawPanel->SetEventDispatcher( m_toolDispatcher ); drawPanel->SetEventDispatcher( m_toolDispatcher );
m_toolManager->RegisterTool( new PCBNEW_CONTROL ); m_toolManager->RegisterTool( new PCBNEW_CONTROL );
m_toolManager->ResetTools( TOOL_BASE::RUN ); m_toolManager->InitTools();
// If a footprint was previously loaded, reload it // If a footprint was previously loaded, reload it
if( getCurNickname().size() && getCurFootprintName().size() ) if( getCurNickname().size() && getCurFootprintName().size() )