eeschema gal: keep grid visibility setting when switching between back-ends
This commit is contained in:
parent
4d8534a7a6
commit
4904ece0b5
|
@ -91,9 +91,7 @@ SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
||||||
EDA_DRAW_FRAME( aKiway, aParent, aWindowType, aTitle, aPosition,
|
EDA_DRAW_FRAME( aKiway, aParent, aWindowType, aTitle, aPosition,
|
||||||
aSize, aStyle, aFrameName )
|
aSize, aStyle, aFrameName )
|
||||||
{
|
{
|
||||||
printf("calling createCanvas\n");
|
|
||||||
createCanvas();
|
createCanvas();
|
||||||
printf("Canvas %p\n", m_canvas);
|
|
||||||
|
|
||||||
m_zoomLevelCoeff = 11.0; // Adjusted to roughly displays zoom level = 1
|
m_zoomLevelCoeff = 11.0; // Adjusted to roughly displays zoom level = 1
|
||||||
// when the screen shows a 1:1 image
|
// when the screen shows a 1:1 image
|
||||||
|
|
|
@ -197,7 +197,16 @@ bool SCH_DRAW_PANEL::SwitchBackend( GAL_TYPE aGalType )
|
||||||
bool rv = EDA_DRAW_PANEL_GAL::SwitchBackend( aGalType );
|
bool rv = EDA_DRAW_PANEL_GAL::SwitchBackend( aGalType );
|
||||||
setDefaultLayerDeps();
|
setDefaultLayerDeps();
|
||||||
m_gal->SetWorldUnitLength( IU_2_GAL_WORLD_UNIT );
|
m_gal->SetWorldUnitLength( IU_2_GAL_WORLD_UNIT );
|
||||||
|
|
||||||
|
// Keep grid size and grid visibility:
|
||||||
m_gal->SetGridSize( grid_size );
|
m_gal->SetGridSize( grid_size );
|
||||||
|
SCH_BASE_FRAME* frame = dynamic_cast<SCH_BASE_FRAME*>( GetParent() );
|
||||||
|
|
||||||
|
if( frame )
|
||||||
|
m_gal->SetGridVisibility( frame->IsGridVisible() );
|
||||||
|
|
||||||
|
Refresh();
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue