From df5b093fdaf4786ce098d499360a8f2754defab4 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 10 May 2020 14:28:41 -0400 Subject: [PATCH] Fix missing GetWindowSettings for LIB_EDIT_FRAME Fixes #4389 --- eeschema/libedit/lib_edit_frame.cpp | 12 ++++++++++++ eeschema/libedit/lib_edit_frame.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/eeschema/libedit/lib_edit_frame.cpp b/eeschema/libedit/lib_edit_frame.cpp index 58108e3e27..780405676f 100644 --- a/eeschema/libedit/lib_edit_frame.cpp +++ b/eeschema/libedit/lib_edit_frame.cpp @@ -239,10 +239,22 @@ void LIB_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg) } +WINDOW_SETTINGS* LIB_EDIT_FRAME::GetWindowSettings( APP_SETTINGS_BASE* aCfg ) +{ + auto cfg = Pgm().GetSettingsManager().GetAppSettings(); + + wxCHECK_MSG( cfg, nullptr, "Could not load libedit settings" ); + + return &cfg->m_Window; +} + + COLOR_SETTINGS* LIB_EDIT_FRAME::GetColorSettings() { auto cfg = Pgm().GetSettingsManager().GetAppSettings(); + wxCHECK_MSG( cfg, nullptr, "Could not load libedit settings" ); + if( cfg->m_UseEeschemaColorSettings ) return m_colorSettings; else diff --git a/eeschema/libedit/lib_edit_frame.h b/eeschema/libedit/lib_edit_frame.h index 7d9ef57a52..07b8ad3ef4 100644 --- a/eeschema/libedit/lib_edit_frame.h +++ b/eeschema/libedit/lib_edit_frame.h @@ -234,6 +234,8 @@ public: void LoadSettings( APP_SETTINGS_BASE* aCfg ) override; void SaveSettings( APP_SETTINGS_BASE* aCfg ) override; + WINDOW_SETTINGS* GetWindowSettings( APP_SETTINGS_BASE* aCfg ) override; + LIBEDIT_SETTINGS* GetSettings() { return m_settings;