From d89520c8ae94ccff278c13cd4f8bd3a7213656bc Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Sat, 1 Mar 2025 13:22:05 +0800 Subject: [PATCH] Avoid message box if font load failure during startup (#8610) Move init sys font into GUI_App, after logging has been set up properly (#8603) This avoid annoying messagebox if somehow failed to load font on windows, and write the message into log files instead --- src/OrcaSlicer.cpp | 1 - src/slic3r/GUI/GUI_App.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OrcaSlicer.cpp b/src/OrcaSlicer.cpp index dc140e2629..7cd84babe0 100644 --- a/src/OrcaSlicer.cpp +++ b/src/OrcaSlicer.cpp @@ -1123,7 +1123,6 @@ int CLI::run(int argc, char **argv) bool start_gui = m_actions.empty() && !downward_check; if (start_gui) { BOOST_LOG_TRIVIAL(info) << "no action, start gui directly" << std::endl; - ::Label::initSysFont(); #ifdef SLIC3R_GUI /*#if !defined(_WIN32) && !defined(__APPLE__) // likely some linux / unix system diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index a01c509b15..58504a064c 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -2202,6 +2202,8 @@ bool GUI_App::on_init_inner() wxLog::SetLogLevel(wxLOG_Message); #endif + ::Label::initSysFont(); + // Set initialization of image handlers before any UI actions - See GH issue #7469 wxInitAllImageHandlers(); #ifdef NDEBUG