mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
FIX: Remember the bed typ of the previous project
Change-Id: Id3b0e4ec7f8b4fcb2396f6f9f22789736e48eb8a (cherry picked from commit 2ea818594b6da0ee323b5e255c36b45ff4247324)
This commit is contained in:
parent
1ed06855a9
commit
2ee113b9da
2 changed files with 11 additions and 1 deletions
|
@ -539,7 +539,9 @@ Sidebar::Sidebar(Plater *parent)
|
|||
wxLaunchDefaultBrowser("https://wiki.bambulab.com/en/x1/manual/compatibility-and-parameter-settings-of-filaments");
|
||||
});
|
||||
|
||||
m_bed_type_list->Select(0);
|
||||
AppConfig *app_config = wxGetApp().app_config;
|
||||
std::string str_bed_type = app_config->get("curr_bed_type");
|
||||
m_bed_type_list->Select(atoi(str_bed_type.c_str()));
|
||||
bed_type_sizer->Add(bed_type_title, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(10));
|
||||
bed_type_sizer->Add(m_bed_type_list, 1, wxLEFT | wxRIGHT | wxEXPAND, FromDIP(10));
|
||||
vsizer_printer->Add(bed_type_sizer, 0, wxEXPAND | wxTOP, FromDIP(5));
|
||||
|
@ -5028,6 +5030,10 @@ void Plater::priv::on_select_bed_type(wxCommandEvent &evt)
|
|||
config.set_key_value("curr_bed_type", new ConfigOptionEnum<BedType>(bed_type));
|
||||
// update plater with new config
|
||||
q->on_config_change(wxGetApp().preset_bundle->full_config());
|
||||
|
||||
// update app_config
|
||||
AppConfig *app_config = wxGetApp().app_config;
|
||||
app_config->set("curr_bed_type", std::to_string(int(bed_type)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue