mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Force grids to have entries.
If they don't in the file, reset to the default Fixes https://gitlab.com/kicad/code/kicad/-/issues/21060
This commit is contained in:
parent
307f3c17bc
commit
e957d10098
@ -455,6 +455,10 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
|
||||
m_params.emplace_back( new PARAM_LIST<GRID>( aJsonPath + ".grid.sizes", &aWindow->grid.grids,
|
||||
DefaultGridSizeList() ) );
|
||||
|
||||
// Force grids to have at least 1 entry. If not, reset to default.
|
||||
if( aWindow->grid.grids.empty() )
|
||||
aWindow->grid.grids = DefaultGridSizeList();
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( aJsonPath + ".grid.last_size",
|
||||
&aWindow->grid.last_size_idx, defaultGridIdx ) );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user