diff --git a/common/settings/app_settings.cpp b/common/settings/app_settings.cpp index 7c7cf587c2..63eb047503 100644 --- a/common/settings/app_settings.cpp +++ b/common/settings/app_settings.cpp @@ -296,16 +296,21 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std: m_params.emplace_back( new PARAM_LIST( 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( aJsonPath + ".grid.last_size", - &aWindow->grid.last_size_idx, 1 ) ); + &aWindow->grid.last_size_idx, defaultGridIdx ) ); m_params.emplace_back( new PARAM( aJsonPath + ".grid.fast_grid_1", - &aWindow->grid.fast_grid_1, 1 ) ); + &aWindow->grid.fast_grid_1, defaultGridIdx ) ); m_params.emplace_back( new PARAM( 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( aJsonPath + ".grid.user_grid_x",