Commit f2b5cf7d authored by Maciej Suminski's avatar Maciej Suminski

Fixed module editor crash when pcbnew is started from the main launcher.

parent 0163b589
...@@ -182,9 +182,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : ...@@ -182,9 +182,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
updateTitle(); updateTitle();
// Create GAL canvas // Create GAL canvas
EDA_DRAW_FRAME* drawFrame = static_cast<EDA_DRAW_FRAME*>( aParent ); PCB_BASE_FRAME* parentFrame = static_cast<PCB_BASE_FRAME*>( Kiway().Player( FRAME_PCB, true ) );
PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize,
drawFrame->GetGalCanvas()->GetBackend() ); parentFrame->GetGalCanvas()->GetBackend() );
SetGalCanvas( drawPanel ); SetGalCanvas( drawPanel );
SetBoard( new BOARD() ); SetBoard( new BOARD() );
...@@ -252,7 +252,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : ...@@ -252,7 +252,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
// Add the layer manager ( most right side of pcbframe ) // Add the layer manager ( most right side of pcbframe )
m_auimgr.AddPane( m_Layers, lyrs.Name( wxT( "m_LayersManagerToolBar" ) ).Right().Layer( 2 ) ); m_auimgr.AddPane( m_Layers, lyrs.Name( wxT( "m_LayersManagerToolBar" ) ).Right().Layer( 2 ) );
// Layers manager is visible and served only in GAL canvas mode. // Layers manager is visible and served only in GAL canvas mode.
m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( drawFrame->IsGalCanvasActive() ); m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( parentFrame->IsGalCanvasActive() );
// The left vertical toolbar (fast acces to display options) // The left vertical toolbar (fast acces to display options)
m_auimgr.AddPane( m_optionsToolBar, m_auimgr.AddPane( m_optionsToolBar,
...@@ -272,7 +272,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : ...@@ -272,7 +272,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
drawPanel->GetViewControls(), this ); drawPanel->GetViewControls(), this );
m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager ); m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager );
if( drawFrame->IsGalCanvasActive() ) if( parentFrame->IsGalCanvasActive() )
{ {
drawPanel->SetEventDispatcher( m_toolDispatcher ); drawPanel->SetEventDispatcher( m_toolDispatcher );
......
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