diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index 1e7f811269..2197390028 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -158,6 +158,9 @@ void PreferencesDialog::show(const std::string& highlight_opt_key /*= std::strin update_color(color_pickres[mode], palette[mode]); } + // invalidate this flag before show preferences + m_settings_layout_changed = false; + this->ShowModal(); } @@ -787,7 +790,6 @@ void PreferencesDialog::accept(wxEvent&) if (auto it = m_values.find("seq_top_layer_only"); it != m_values.end()) m_seq_top_layer_only_changed = app_config->get("seq_top_layer_only") != it->second; - m_settings_layout_changed = false; for (const std::string& key : { "old_settings_layout_mode", "dlg_settings_layout_mode" }) { diff --git a/src/slic3r/GUI/TopBar.cpp b/src/slic3r/GUI/TopBar.cpp index d8143b7d57..ff6db3c798 100644 --- a/src/slic3r/GUI/TopBar.cpp +++ b/src/slic3r/GUI/TopBar.cpp @@ -204,6 +204,7 @@ void TopBarItemsCtrl::ButtonWithPopup::SetLabel(const wxString& label) } m_label = text; + Refresh(); GetParent()->Layout(); } @@ -421,7 +422,7 @@ TopBarItemsCtrl::TopBarItemsCtrl(wxWindow *parent, TopBarMenus* menus/* = nullpt if (m_cb_settings_btn) { m_settings_btn = new Button(this, _L("Settings"/*, "settings"*/)); m_settings_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event) { m_cb_settings_btn(); }); - left_sizer->Add(m_settings_btn, 0, wxALIGN_CENTER_VERTICAL); + left_sizer->Add(m_settings_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, m_btn_margin); } m_buttons_sizer = new wxFlexGridSizer(1, m_btn_margin, m_btn_margin);