Commit 31389c40 authored by tomasz.'s avatar tomasz.

pcbnew: tool initialization should belong to PCB_EDIT_FRAME to avoid linking errors on cvpcb.

parent 69a44d5f
......@@ -98,7 +98,6 @@ protected:
TOOL_MANAGER *m_toolManager;
TOOL_DISPATCHER *m_toolDispatcher;
void setupTools();
void updateGridSelectBox();
void updateZoomSelectBox();
virtual void unitsChangeRefresh();
......
......@@ -117,6 +117,7 @@ protected:
bool m_useCmpFileForFpNames; ///< is true, use the .cmp file from CvPcb, else use the netlist
// to know the footprint name of components.
void setupTools();
void onGenericCommand( wxCommandEvent& aEvent );
// we'll use lower case function names for private member functions.
......
......@@ -115,8 +115,6 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType,
m_galCanvas = new EDA_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize,
EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL );
setupTools();
m_auxiliaryToolBar = NULL;
}
......
......@@ -321,6 +321,8 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title,
for ( int i = 0; i < 10; i++ )
m_Macros[i].m_Record.clear();
setupTools();
SetBoard( new BOARD() );
// Create the PCB_LAYER_WIDGET *after* SetBoard():
......@@ -481,7 +483,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title,
}
}
setupTools();
}
PCB_EDIT_FRAME::~PCB_EDIT_FRAME()
......
......@@ -36,11 +36,11 @@
#include "selection_tool.h"
void PCB_BASE_FRAME::setupTools()
void PCB_EDIT_FRAME::setupTools()
{
// create the manager and dispatcher. Route draw panel events to the dispatcher.
m_toolManager = new TOOL_MANAGER;
m_toolDispatcher = new TOOL_DISPATCHER_PCBNEW( m_toolManager, this );
m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this );
m_galCanvas->SetEventDispatcher (m_toolDispatcher);
// register our selection tool.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment