mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06:00
Fix: Dialog initialization ordering on OS X
Perform update_check after MainFrame is created
This commit is contained in:
parent
2e061994d4
commit
aef0c489e3
5 changed files with 38 additions and 18 deletions
|
@ -356,8 +356,7 @@ void add_config_menu(wxMenuBar *menu, int event_preferences_changed, int event_l
|
|||
Config::SnapshotDB::singleton().restore_snapshot(dlg.snapshot_to_activate(), *g_AppConfig).id);
|
||||
g_PresetBundle->load_presets(*g_AppConfig);
|
||||
// Load the currently selected preset into the GUI, update the preset selection box.
|
||||
for (Tab *tab : g_tabs_list)
|
||||
tab->load_current_preset();
|
||||
load_current_presets();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -451,9 +450,8 @@ void config_wizard(int reason)
|
|||
show_error(nullptr, e.what());
|
||||
}
|
||||
|
||||
// Load the currently selected preset into the GUI, update the preset selection box.
|
||||
for (Tab *tab : g_tabs_list)
|
||||
tab->load_current_preset();
|
||||
// Load the currently selected preset into the GUI, update the preset selection box.
|
||||
load_current_presets();
|
||||
}
|
||||
|
||||
void open_preferences_dialog(int event_preferences)
|
||||
|
@ -605,6 +603,13 @@ void add_created_tab(Tab* panel)
|
|||
g_wxTabPanel->AddPage(panel, panel->title());
|
||||
}
|
||||
|
||||
void load_current_presets()
|
||||
{
|
||||
for (Tab *tab : g_tabs_list) {
|
||||
tab->load_current_preset();
|
||||
}
|
||||
}
|
||||
|
||||
void show_error(wxWindow* parent, const wxString& message) {
|
||||
ErrorDialog msg(parent, message);
|
||||
msg.ShowModal();
|
||||
|
|
|
@ -116,6 +116,9 @@ void add_created_tab(Tab* panel);
|
|||
// Change option value in config
|
||||
void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt_key, const boost::any& value, int opt_index = 0);
|
||||
|
||||
// Update UI / Tabs to reflect changes in the currently loaded presets
|
||||
void load_current_presets();
|
||||
|
||||
void show_error(wxWindow* parent, const wxString& message);
|
||||
void show_error_id(int id, const std::string& message); // For Perl
|
||||
void show_info(wxWindow* parent, const wxString& message, const wxString& title);
|
||||
|
|
|
@ -101,6 +101,7 @@ PresetBundle::~PresetBundle()
|
|||
void PresetBundle::reset(bool delete_files)
|
||||
{
|
||||
// Clear the existing presets, delete their respective files.
|
||||
this->vendors.clear();
|
||||
this->prints .reset(delete_files);
|
||||
this->filaments.reset(delete_files);
|
||||
this->printers .reset(delete_files);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue