From bc6e6492af91b2162752dbfc73c8e5a8e60bdf5c Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 5 Jun 2018 14:38:22 +0200 Subject: [PATCH] Move font initialization to init_fonts --- xs/src/slic3r/GUI/GUI.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 9179710fd9..4a8fbb6e70 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -142,8 +142,8 @@ wxDataViewCtrl *m_objects_ctrl = nullptr; MyObjectTreeModel *m_objects_model = nullptr; wxCollapsiblePane *m_collpane_settings = nullptr; -wxFont g_small_font { wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT) }; -wxFont g_bold_font { wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).Bold() }; +wxFont g_small_font; +wxFont g_bold_font; static void init_label_colours() { @@ -175,6 +175,8 @@ void update_label_colours_from_appconfig() static void init_fonts() { + g_small_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + g_bold_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).Bold(); #ifdef __WXMAC__ g_small_font.SetPointSize(11); g_bold_font.SetPointSize(11);