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

@ -377,6 +377,18 @@ 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
{
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", return { "1000 mil",
"500 mil", "500 mil",
@ -401,6 +413,7 @@ const std::vector<wxString> APP_SETTINGS_BASE::DefaultGridSizeList() const
"0.025 mm", "0.025 mm",
"0.01 mm" }; "0.01 mm" };
} }
}
bool APP_SETTINGS_BASE::migrateLibTreeWidth() bool APP_SETTINGS_BASE::migrateLibTreeWidth()

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;