mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-21 18:02:09 +00:00
ENH:add log
jira: STUDIO-10445 Change-Id: If1c2b41b0f93a2f1f8bde4b3aa543a9ddeaccc08 (cherry picked from commit 4166a156ea2530d3ba348c579d188c9231fb81d9)
This commit is contained in:
@@ -1140,16 +1140,19 @@ bool Sidebar::priv::sync_extruder_list(bool &only_external_material)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!plater->check_printer_initialized(obj))
|
||||
if (!plater->check_printer_initialized(obj)) {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " check_printer_initialized fail";
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string machine_print_name = obj->printer_type;
|
||||
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||
std::string target_model_id = preset_bundle->printers.get_selected_preset().get_printer_type(preset_bundle);
|
||||
Preset* machine_preset = get_printer_preset(obj);
|
||||
if (!machine_preset)
|
||||
if (!machine_preset) {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << "check error: machine_preset empty";
|
||||
return false;
|
||||
|
||||
}
|
||||
if (machine_print_name != target_model_id) {
|
||||
MessageDialog dlg(this->plater, _L("The currently selected machine preset is inconsistent with the connected printer type.\n"
|
||||
"Are you sure to continue syncing?"), _L("Sync printer information"), wxICON_WARNING | wxYES | wxNO);
|
||||
|
||||
Reference in New Issue
Block a user