From 6129f978ab11e9177b16acec233d0525a6581f7e Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 12 Apr 2021 22:03:25 -0400 Subject: [PATCH] Fix symbol editor not pulling the right settings object Fixes https://gitlab.com/kicad/code/kicad/-/issues/7916 --- eeschema/symbol_editor/symbol_edit_frame.cpp | 8 +++++++- eeschema/symbol_editor/symbol_edit_frame.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index 5526ef3f80..c6a8a48378 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -280,6 +280,12 @@ void SYMBOL_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg ) } +APP_SETTINGS_BASE* SYMBOL_EDIT_FRAME::config() const +{ + return static_cast( 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 ); diff --git a/eeschema/symbol_editor/symbol_edit_frame.h b/eeschema/symbol_editor/symbol_edit_frame.h index 65ef3c4951..b6b6b72abc 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.h +++ b/eeschema/symbol_editor/symbol_edit_frame.h @@ -196,6 +196,8 @@ public: return m_settings; } + APP_SETTINGS_BASE* config() const override; + COLOR_SETTINGS* GetColorSettings() const override; /**