mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-29 05:22:01 +08:00
Preferences: Fixes invalidation of the m_settings_layout_changed flag.
+ TopBar: Fixed margins for Settings button and refresh of the PopupButtons
This commit is contained in:
parent
f004f815ce
commit
795c3a7dd6
@ -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" })
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user