mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-01-30 16:38:41 +03:00
fix some bug
This commit is contained in:
@@ -3368,9 +3368,7 @@ std::map<int, DynamicPrintConfig> Sidebar::build_filament_box_list(std::vector<s
|
||||
tray_config.set_key_value("filament_exist", new ConfigOptionBools{ true }); //default
|
||||
|
||||
tray_config.set_key_value("filament_multi_colors", new ConfigOptionStrings{});
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
tray_config.opt<ConfigOptionStrings>("filament_multi_colors")->values.push_back(into_u8(wxColour(color[j]).GetAsString(wxC2S_HTML_SYNTAX)));
|
||||
}
|
||||
tray_config.opt<ConfigOptionStrings>("filament_multi_colors")->values.push_back(into_u8(wxColour(color[i]).GetAsString(wxC2S_HTML_SYNTAX)));
|
||||
filament_ams_list.emplace('A' + i, std::move(tray_config));
|
||||
}
|
||||
|
||||
@@ -3388,9 +3386,7 @@ std::map<int, DynamicPrintConfig> Sidebar::build_filament_box_list(std::vector<s
|
||||
tray_config.set_key_value("filament_exist", new ConfigOptionBools{ true }); //default
|
||||
|
||||
tray_config.set_key_value("filament_multi_colors", new ConfigOptionStrings{});
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
tray_config.opt<ConfigOptionStrings>("filament_multi_colors")->values.push_back(into_u8(wxColour(color[j]).GetAsString(wxC2S_HTML_SYNTAX)));
|
||||
}
|
||||
tray_config.opt<ConfigOptionStrings>("filament_multi_colors")->values.push_back(into_u8(wxColour(color.back()).GetAsString(wxC2S_HTML_SYNTAX)));
|
||||
filament_ams_list.emplace('A' + count + 1, std::move(tray_config));
|
||||
}
|
||||
|
||||
|
||||
@@ -4441,8 +4441,18 @@ void SelectMachineDialog::set_default()
|
||||
show_error(this, ex.what(), false);
|
||||
}
|
||||
}
|
||||
else
|
||||
filename = m_plater->get_output_filename();
|
||||
else{
|
||||
try{
|
||||
filename = m_plater->get_output_filename();
|
||||
}
|
||||
catch (const Slic3r::PlaceholderParserError& ex) {
|
||||
// Show the error with monospaced font.
|
||||
show_error(this, ex.what(), true);
|
||||
}
|
||||
catch (const std::exception &ex) {
|
||||
show_error(this, ex.what(), false);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_print_plate_idx == PLATE_ALL_IDX && filename.empty()) {
|
||||
filename = _L("Untitled");
|
||||
|
||||
@@ -1629,8 +1629,18 @@ void SendMultiMachinePage::set_default()
|
||||
show_error(this, ex.what(), false);
|
||||
}
|
||||
}
|
||||
else
|
||||
filename = m_plater->get_output_filename();
|
||||
else{
|
||||
try{
|
||||
filename = m_plater->get_output_filename();
|
||||
}
|
||||
catch (const Slic3r::PlaceholderParserError& ex) {
|
||||
// Show the error with monospaced font.
|
||||
show_error(this, ex.what(), true);
|
||||
}
|
||||
catch (const std::exception &ex) {
|
||||
show_error(this, ex.what(), false);
|
||||
}
|
||||
}
|
||||
|
||||
if (filename.empty()) {
|
||||
filename = m_plater->get_export_gcode_filename("", true);
|
||||
|
||||
@@ -1912,8 +1912,18 @@ void SendToPrinterDialog::set_default()
|
||||
show_error(this, ex.what(), false);
|
||||
}
|
||||
}
|
||||
else
|
||||
filename = m_plater->get_output_filename();
|
||||
else{
|
||||
try{
|
||||
filename = m_plater->get_output_filename();
|
||||
}
|
||||
catch (const Slic3r::PlaceholderParserError& ex) {
|
||||
// Show the error with monospaced font.
|
||||
show_error(this, ex.what(), true);
|
||||
}
|
||||
catch (const std::exception &ex) {
|
||||
show_error(this, ex.what(), false);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_print_plate_idx == PLATE_ALL_IDX && filename.empty()) {
|
||||
filename = _L("Untitled");
|
||||
|
||||
Reference in New Issue
Block a user