Make sure ResetGridSizes works for SCH apps.

This commit is contained in:
Jeff Young 2023-01-05 16:30:55 +00:00
parent 7af718f1a5
commit 3d8d27caf3
2 changed files with 36 additions and 29 deletions

View File

@ -378,28 +378,41 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
const std::vector<wxString> APP_SETTINGS_BASE::DefaultGridSizeList() const
{
return { "1000 mil",
"500 mil",
"250 mil",
"200 mil",
"100 mil",
"50 mil",
"25 mil",
"20 mil",
"10 mil",
"5 mil",
"2 mil",
"1 mil",
"5.0 mm",
"2.5 mm",
"1.0 mm",
"0.5 mm",
"0.25 mm",
"0.2 mm",
"0.1 mm",
"0.05 mm",
"0.025 mm",
"0.01 mm" };
if( m_filename == "eeschema" || m_filename == "symbol_editor" )
{
return { "100 mil",
"50 mil",
"25 mil",
"10 mil",
"5 mil",
"2 mil",
"1 mil" };
}
else
{
return { "1000 mil",
"500 mil",
"250 mil",
"200 mil",
"100 mil",
"50 mil",
"25 mil",
"20 mil",
"10 mil",
"5 mil",
"2 mil",
"1 mil",
"5.0 mm",
"2.5 mm",
"1.0 mm",
"0.5 mm",
"0.25 mm",
"0.2 mm",
"0.1 mm",
"0.05 mm",
"0.025 mm",
"0.01 mm" };
}
}

View File

@ -167,13 +167,7 @@ public:
virtual bool MigrateFromLegacy( wxConfigBase* aCfg ) override;
/**
* By default, this returns the list of grids available in PcbNew-based applications.
* Eeschema does not allow customization of the grid. If it ever does, override this in
* Eeschema settings to provide a different set of defaults.
* @return a default value for the window.grid.sizes parameter
*/
virtual const std::vector<wxString> DefaultGridSizeList() const;
const std::vector<wxString> DefaultGridSizeList() const;
public:
CROSS_PROBING_SETTINGS m_CrossProbing;