Grid Settings: keep sane via value when hidden in schematic editors

This commit is contained in:
Mike Williams 2023-08-24 12:38:20 -04:00
parent d00a6b4987
commit 1628b65d79
2 changed files with 8 additions and 0 deletions

View File

@ -67,6 +67,7 @@ DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS( EDA_DRAW_FRAME* aParent ) :
sbGridOriginSizer->ShowItems( false );
// No vias in the schematics
m_GridOverrideViasSize->SetValue( wxT( "50 mil" ) );
m_checkGridOverrideVias->Hide();
m_staticTextVias->Hide();
m_GridOverrideViasSize->Hide();

View File

@ -355,6 +355,8 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
&aWindow->grid.override_connectables, true ) );
m_params.emplace_back( new PARAM<bool>( aJsonPath + ".grid.override_wires",
&aWindow->grid.override_wires, true ) );
m_params.emplace_back( new PARAM<bool>( aJsonPath + ".grid.override_vias",
&aWindow->grid.override_vias, false ) );
m_params.emplace_back( new PARAM<bool>( aJsonPath + ".grid.override_text",
&aWindow->grid.override_text, false ) );
m_params.emplace_back( new PARAM<bool>( aJsonPath + ".grid.override_graphics",
@ -366,6 +368,9 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
m_params.emplace_back( new PARAM<wxString>( aJsonPath + ".grid.override_wires_size",
&aWindow->grid.override_wires_size,
"50 mil" ) );
m_params.emplace_back( new PARAM<wxString>( aJsonPath + ".grid.override_vias_size",
&aWindow->grid.override_vias_size,
"50 mil" ) );
m_params.emplace_back( new PARAM<wxString>( aJsonPath + ".grid.override_text_size",
&aWindow->grid.override_text_size, "10 mil" ) );
m_params.emplace_back( new PARAM<wxString>( aJsonPath + ".grid.override_graphics_size",
@ -380,6 +385,8 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
&aWindow->grid.override_connectables, false ) );
m_params.emplace_back( new PARAM<bool>( aJsonPath + ".grid.override_wires",
&aWindow->grid.override_wires, false ) );
m_params.emplace_back( new PARAM<bool>( aJsonPath + ".grid.override_vias",
&aWindow->grid.override_wires, false ) );
m_params.emplace_back( new PARAM<bool>( aJsonPath + ".grid.override_text",
&aWindow->grid.override_text, false ) );
m_params.emplace_back( new PARAM<bool>( aJsonPath + ".grid.override_graphics",