Separate default grid between eeschema/symeditor and other apps.
Fixes https://gitlab.com/kicad/code/kicad/issues/9472
This commit is contained in:
parent
fe6cb7dbb4
commit
b42fce430d
|
@ -296,16 +296,21 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
|
|||
m_params.emplace_back( new PARAM_LIST<wxString>( aJsonPath + ".grid.sizes",
|
||||
&aWindow->grid.sizes, DefaultGridSizeList() ) );
|
||||
|
||||
// pcbnew default grid doesn't matter much, but eeschema does, so default to the index
|
||||
// of the 50mil grid in eeschema
|
||||
int defaultGridIdx;
|
||||
|
||||
if( m_filename == "eeschema" || m_filename == "symbol_editor" )
|
||||
defaultGridIdx = 1;
|
||||
else
|
||||
defaultGridIdx = 4;
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( aJsonPath + ".grid.last_size",
|
||||
&aWindow->grid.last_size_idx, 1 ) );
|
||||
&aWindow->grid.last_size_idx, defaultGridIdx ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( aJsonPath + ".grid.fast_grid_1",
|
||||
&aWindow->grid.fast_grid_1, 1 ) );
|
||||
&aWindow->grid.fast_grid_1, defaultGridIdx ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( aJsonPath + ".grid.fast_grid_2",
|
||||
&aWindow->grid.fast_grid_2, 2 ) );
|
||||
&aWindow->grid.fast_grid_2, defaultGridIdx + 1 ) );
|
||||
|
||||
// for grid user, use a default value compatible with eeschema and pcbnew (10 mils)
|
||||
m_params.emplace_back( new PARAM<wxString>( aJsonPath + ".grid.user_grid_x",
|
||||
|
|
Loading…
Reference in New Issue