diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 5d72dcc8b..417afdfbd 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -231,6 +231,9 @@ void MainFrame::shutdown() // In addition, there were some crashes due to the Paint events sent to already destructed windows. this->Show(false); + if (m_settings_dialog) + m_settings_dialog->Destroy(); + // Stop the background thread (Windows and Linux). // Disconnect from a 3DConnextion driver (OSX). m_plater->get_mouse3d_controller().shutdown(); @@ -295,6 +298,9 @@ void MainFrame::init_tabpanel() wxGetApp().app_config->get("new_settings_layout_mode") == "1" ? slNew : wxGetApp().app_config->get("dlg_settings_layout_mode") == "1" ? slDlg : slOld; + // From the very beginning the Print settings should be selected + m_last_selected_tab = m_layout == slDlg ? 0 : 1; + if (m_layout == slDlg) { m_settings_dialog = new SettingsDialog(); m_tabpanel = m_settings_dialog->get_tabpanel(); diff --git a/src/slic3r/GUI/MainFrame.hpp b/src/slic3r/GUI/MainFrame.hpp index 536191700..5c8bd2f86 100644 --- a/src/slic3r/GUI/MainFrame.hpp +++ b/src/slic3r/GUI/MainFrame.hpp @@ -73,7 +73,7 @@ class MainFrame : public DPIFrame PrintHostQueueDialog *m_printhost_queue_dlg; - size_t m_last_selected_tab {1}; + size_t m_last_selected_tab; std::string get_base_name(const wxString &full_name, const char *extension = nullptr) const; std::string get_dir_name(const wxString &full_name) const; diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index 5963a1637..f8fa1a233 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -325,7 +325,7 @@ void PreferencesDialog::create_settings_mode_widget() wxRadioBox* box = new wxRadioBox(parent, wxID_ANY, _L("Settings layout mode"), wxDefaultPosition, wxDefaultSize, WXSIZEOF(choices), choices, 3, wxRA_SPECIFY_ROWS); - box->SetButtonFont(wxGetApp().normal_font()); + box->SetFont(wxGetApp().normal_font()); box->SetSelection(selection); box->Bind(wxEVT_RADIOBOX, [this](wxCommandEvent& e) { @@ -339,7 +339,7 @@ void PreferencesDialog::create_settings_mode_widget() auto sizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(box, 1, wxALIGN_CENTER_VERTICAL); - m_optgroup_gui->sizer->Add(sizer, 0, wxEXPAND | wxALL, em_unit()); + m_optgroup_gui->sizer->Add(sizer, 0, wxEXPAND); }