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 const std::vector<wxString> APP_SETTINGS_BASE::DefaultGridSizeList() const
{ {
return { "1000 mil", if( m_filename == "eeschema" || m_filename == "symbol_editor" )
"500 mil", {
"250 mil", return { "100 mil",
"200 mil", "50 mil",
"100 mil", "25 mil",
"50 mil", "10 mil",
"25 mil", "5 mil",
"20 mil", "2 mil",
"10 mil", "1 mil" };
"5 mil", }
"2 mil", else
"1 mil", {
"5.0 mm", return { "1000 mil",
"2.5 mm", "500 mil",
"1.0 mm", "250 mil",
"0.5 mm", "200 mil",
"0.25 mm", "100 mil",
"0.2 mm", "50 mil",
"0.1 mm", "25 mil",
"0.05 mm", "20 mil",
"0.025 mm", "10 mil",
"0.01 mm" }; "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; virtual bool MigrateFromLegacy( wxConfigBase* aCfg ) override;
/** const std::vector<wxString> DefaultGridSizeList() const;
* 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;
public: public:
CROSS_PROBING_SETTINGS m_CrossProbing; CROSS_PROBING_SETTINGS m_CrossProbing;