Layouts:
1. Fixed crash on OSX after change of the settings layout (PreferencesDialog should be destroyed before call of recreate_GUI) 2. Fixed dialog message during GUI recreation 3. In PreferencesDialog changed radio buttons view (under OSX they were bold) 4. slDlg mode - fixed switching between main frame and settings dialog (dialog->SetFocus() doesn't work under OSX, so we just hide it and show again)
This commit is contained in:
parent
8969613a5a
commit
3c996111aa
6 changed files with 33 additions and 24 deletions
src/slic3r/GUI
|
@ -117,13 +117,6 @@ void PreferencesDialog::build()
|
|||
m_optgroup_general->append_single_option_line(option);
|
||||
#endif
|
||||
|
||||
def.label = L("Show the button for the collapse sidebar");
|
||||
def.type = coBool;
|
||||
def.tooltip = L("If enabled, the button for the collapse sidebar will be appeared in top right corner of the 3D Scene");
|
||||
def.set_default_value(new ConfigOptionBool{ app_config->get("show_collapse_button") == "1" });
|
||||
option = Option(def, "show_collapse_button");
|
||||
m_optgroup_general->append_single_option_line(option);
|
||||
|
||||
m_optgroup_camera = std::make_shared<ConfigOptionsGroup>(this, _(L("Camera")));
|
||||
m_optgroup_camera->label_width = 40;
|
||||
m_optgroup_camera->m_on_change = [this](t_config_option_key opt_key, boost::any value) {
|
||||
|
@ -154,6 +147,13 @@ void PreferencesDialog::build()
|
|||
}
|
||||
};
|
||||
|
||||
def.label = L("Show the button for the collapse sidebar");
|
||||
def.type = coBool;
|
||||
def.tooltip = L("If enabled, the button for the collapse sidebar will be appeared in top right corner of the 3D Scene");
|
||||
def.set_default_value(new ConfigOptionBool{ app_config->get("show_collapse_button") == "1" });
|
||||
option = Option(def, "show_collapse_button");
|
||||
m_optgroup_gui->append_single_option_line(option);
|
||||
|
||||
def.label = L("Use custom size for toolbar icons");
|
||||
def.type = coBool;
|
||||
def.tooltip = L("If enabled, you can change size of toolbar icons manually.");
|
||||
|
@ -190,11 +190,11 @@ void PreferencesDialog::accept()
|
|||
|
||||
auto app_config = get_app_config();
|
||||
|
||||
bool settings_layout_changed = m_values.find("old_settings_layout_mode") != m_values.end() ||
|
||||
m_values.find("new_settings_layout_mode") != m_values.end() ||
|
||||
m_values.find("dlg_settings_layout_mode") != m_values.end();
|
||||
m_settings_layout_changed = m_values.find("old_settings_layout_mode") != m_values.end() ||
|
||||
m_values.find("new_settings_layout_mode") != m_values.end() ||
|
||||
m_values.find("dlg_settings_layout_mode") != m_values.end();
|
||||
|
||||
if (settings_layout_changed) {
|
||||
if (m_settings_layout_changed) {
|
||||
// the dialog needs to be destroyed before the call to recreate_gui()
|
||||
// or sometimes the application crashes into wxDialogBase() destructor
|
||||
// so we put it into an inner scope
|
||||
|
@ -222,9 +222,8 @@ void PreferencesDialog::accept()
|
|||
app_config->save();
|
||||
EndModal(wxID_OK);
|
||||
|
||||
if (settings_layout_changed)
|
||||
// recreate application, if settings layout was changed
|
||||
wxGetApp().recreate_GUI();
|
||||
if (m_settings_layout_changed)
|
||||
;// application will be recreated after Preference dialog will be destroyed
|
||||
else
|
||||
// Nothify the UI to update itself from the ini file.
|
||||
wxGetApp().update_ui_from_settings();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue