Fix symbol editor not pulling the right settings object

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7916
This commit is contained in:
Jon Evans 2021-04-12 22:03:25 -04:00
parent 36ef198610
commit 6129f978ab
2 changed files with 9 additions and 1 deletions

View File

@ -280,6 +280,12 @@ void SYMBOL_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
}
APP_SETTINGS_BASE* SYMBOL_EDIT_FRAME::config() const
{
return static_cast<APP_SETTINGS_BASE*>( GetSettings() );
}
COLOR_SETTINGS* SYMBOL_EDIT_FRAME::GetColorSettings() const
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
@ -296,7 +302,7 @@ void SYMBOL_EDIT_FRAME::setupTools()
// Create the manager and dispatcher & route draw panel events to the dispatcher
m_toolManager = new TOOL_MANAGER;
m_toolManager->SetEnvironment( GetScreen(), GetCanvas()->GetView(),
GetCanvas()->GetViewControls(), config(), this );
GetCanvas()->GetViewControls(), GetSettings(), this );
m_actions = new EE_ACTIONS();
m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager );

View File

@ -196,6 +196,8 @@ public:
return m_settings;
}
APP_SETTINGS_BASE* config() const override;
COLOR_SETTINGS* GetColorSettings() const override;
/**