Repair initialization order in FOOTPRINT_VIEWER_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/5267
This commit is contained in:
parent
4cd994611b
commit
a13f6c3922
|
@ -169,6 +169,12 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
|
||||||
fpPanel->SetSizer( fpSizer );
|
fpPanel->SetSizer( fpSizer );
|
||||||
fpPanel->Fit();
|
fpPanel->Fit();
|
||||||
|
|
||||||
|
// Create GAL canvas
|
||||||
|
m_canvasType = LoadCanvasTypeSetting();
|
||||||
|
auto drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize,
|
||||||
|
GetGalDisplayOptions(), m_canvasType );
|
||||||
|
SetCanvas( drawPanel );
|
||||||
|
|
||||||
SetBoard( new BOARD() );
|
SetBoard( new BOARD() );
|
||||||
// In viewer, the default net clearance is not known (it depends on the actual board).
|
// In viewer, the default net clearance is not known (it depends on the actual board).
|
||||||
// So we do not show the default clearance, by setting it to 0
|
// So we do not show the default clearance, by setting it to 0
|
||||||
|
@ -187,12 +193,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
|
||||||
LoadSettings( config() );
|
LoadSettings( config() );
|
||||||
GetGalDisplayOptions().m_axesEnabled = true;
|
GetGalDisplayOptions().m_axesEnabled = true;
|
||||||
|
|
||||||
// Create GAL canvas
|
|
||||||
m_canvasType = LoadCanvasTypeSetting();
|
|
||||||
auto drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize,
|
|
||||||
GetGalDisplayOptions(), m_canvasType );
|
|
||||||
SetCanvas( drawPanel );
|
|
||||||
|
|
||||||
// Create the manager and dispatcher & route draw panel events to the dispatcher
|
// Create the manager and dispatcher & route draw panel events to the dispatcher
|
||||||
m_toolManager = new TOOL_MANAGER;
|
m_toolManager = new TOOL_MANAGER;
|
||||||
m_toolManager->SetEnvironment( GetBoard(), drawPanel->GetView(),
|
m_toolManager->SetEnvironment( GetBoard(), drawPanel->GetView(),
|
||||||
|
|
Loading…
Reference in New Issue