From 57ae43890cb0718306064d08f1d5c49e8cf7dd42 Mon Sep 17 00:00:00 2001 From: Mark Roszko Date: Wed, 3 May 2023 17:32:55 +0000 Subject: [PATCH] Update 5 files - /eeschema/CMakeLists.txt - /eeschema/eeschema.cpp - /pcbnew/pcbnew.cpp - /qa/qa_utils/pcb_test_frame.cpp - /qa/unittests/eeschema/test_module.cpp --- eeschema/CMakeLists.txt | 1 - eeschema/eeschema.cpp | 3 ++- pcbnew/pcbnew.cpp | 9 +++++---- qa/qa_utils/pcb_test_frame.cpp | 3 +++ qa/unittests/eeschema/test_module.cpp | 7 +++++++ 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 048c6d4d4c..594b6fedeb 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -34,7 +34,6 @@ include_directories( ${CMAKE_SOURCE_DIR}/common ${CMAKE_SOURCE_DIR}/common/dialogs ${CMAKE_SOURCE_DIR}/libs/sexpr/include - ${CMAKE_SOURCE_DIR}/3d-viewer ${INC_AFTER} ./dialogs ./libview diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index 7c412f9a4e..aa5ab55cd6 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -332,11 +332,12 @@ bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) // This is process-level-initialization, not project-level-initialization of the DSO. // Do nothing in here pertinent to a project! InitSettings( new EESCHEMA_SETTINGS ); - aProgram->GetSettingsManager().RegisterSettings( KifaceSettings() ); + aProgram->GetSettingsManager().RegisterSettings( KifaceSettings(), false ); // Register the symbol editor settings as well because they share a KiFACE and need to be // loaded prior to use to avoid threading deadlocks aProgram->GetSettingsManager().RegisterSettings( new SYMBOL_EDITOR_SETTINGS, false ); + aProgram->GetSettingsManager().Load(); start_common( aCtlBits ); diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index d7eacbf74e..11e54291c6 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -348,14 +348,15 @@ bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) // This is process-level-initialization, not project-level-initialization of the DSO. // Do nothing in here pertinent to a project! InitSettings( new PCBNEW_SETTINGS ); - aProgram->GetSettingsManager().RegisterSettings( KifaceSettings() ); + aProgram->GetSettingsManager().RegisterSettings( KifaceSettings(), false ); // Register the footprint editor settings as well because they share a KiFACE and need to be // loaded prior to use to avoid threading deadlocks - aProgram->GetSettingsManager().RegisterSettings( new FOOTPRINT_EDITOR_SETTINGS ); - aProgram->GetSettingsManager().RegisterSettings( new CVPCB_SETTINGS ); - aProgram->GetSettingsManager().RegisterSettings( new EDA_3D_VIEWER_SETTINGS ); + aProgram->GetSettingsManager().RegisterSettings( new FOOTPRINT_EDITOR_SETTINGS, false ); + aProgram->GetSettingsManager().RegisterSettings( new CVPCB_SETTINGS, false ); + aProgram->GetSettingsManager().RegisterSettings( new EDA_3D_VIEWER_SETTINGS, false ); + aProgram->GetSettingsManager().Load(); start_common( aCtlBits ); if( !loadGlobalLibTable() ) diff --git a/qa/qa_utils/pcb_test_frame.cpp b/qa/qa_utils/pcb_test_frame.cpp index f11b27c70b..12498e69fc 100644 --- a/qa/qa_utils/pcb_test_frame.cpp +++ b/qa/qa_utils/pcb_test_frame.cpp @@ -83,6 +83,9 @@ void PCB_TEST_FRAME_BASE::SetBoard( std::shared_ptr b ) #ifdef USE_TOOL_MANAGER SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager(); + + mgr.RegisterSettings( new PCBNEW_SETTINGS, false ); + PCBNEW_SETTINGS* cfg = mgr.GetAppSettings(); m_toolManager->SetEnvironment( m_board.get(), m_galPanel->GetView(), diff --git a/qa/unittests/eeschema/test_module.cpp b/qa/unittests/eeschema/test_module.cpp index 0052337db1..329f6346bb 100644 --- a/qa/unittests/eeschema/test_module.cpp +++ b/qa/unittests/eeschema/test_module.cpp @@ -30,6 +30,9 @@ #include #include +#include +#include +#include #include #include @@ -60,6 +63,10 @@ bool init_unit_test() wxSetAssertHandler( &wxAssertThrower ); Pgm().InitPgm( true, true, true ); + Pgm().GetSettingsManager().RegisterSettings( new EESCHEMA_SETTINGS, false ); + Pgm().GetSettingsManager().RegisterSettings( new SYMBOL_EDITOR_SETTINGS, false ); + Pgm().GetSettingsManager().Load(); + return ok; }