fpeditor: Fix initial grid display setting
The footprint editor didn't respect the display setting showing/hiding the grid on startup. Fixes: lp:1843169 * https://bugs.launchpad.net/kicad/+bug/1843169
This commit is contained in:
parent
04b0feb365
commit
69e20c73ad
|
@ -214,8 +214,6 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
||||||
|
|
||||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
|
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
|
||||||
|
|
||||||
GetCanvas()->GetGAL()->SetAxesEnabled( true );
|
|
||||||
GetCanvas()->GetGAL()->SetGridSize( VECTOR2D( GetScreen()->GetGridSize() ) );
|
|
||||||
GetCanvas()->GetView()->SetScale( GetZoomLevelCoeff() / GetScreen()->GetZoom() );
|
GetCanvas()->GetView()->SetScale( GetZoomLevelCoeff() / GetScreen()->GetZoom() );
|
||||||
ActivateGalCanvas();
|
ActivateGalCanvas();
|
||||||
|
|
||||||
|
@ -814,8 +812,13 @@ void FOOTPRINT_EDIT_FRAME::ActivateGalCanvas()
|
||||||
{
|
{
|
||||||
PCB_BASE_EDIT_FRAME::ActivateGalCanvas();
|
PCB_BASE_EDIT_FRAME::ActivateGalCanvas();
|
||||||
|
|
||||||
// Be sure the axis are enabled:
|
// Be sure the axis are enabled
|
||||||
GetCanvas()->GetGAL()->SetAxesEnabled( true );
|
GetCanvas()->GetGAL()->SetAxesEnabled( true );
|
||||||
|
|
||||||
|
// Setup the grid
|
||||||
|
GetCanvas()->GetGAL()->SetGridSize( VECTOR2D( GetScreen()->GetGridSize() ) );
|
||||||
|
GetCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
|
||||||
|
|
||||||
updateView();
|
updateView();
|
||||||
|
|
||||||
// Ensure the m_Layers settings are using the canvas type:
|
// Ensure the m_Layers settings are using the canvas type:
|
||||||
|
|
Loading…
Reference in New Issue