mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 04:22:04 +08:00
Fixed crashes related to SLA
This commit is contained in:
parent
65610036d6
commit
6f2e22280b
@ -3345,7 +3345,8 @@ unsigned int Plater::priv::update_background_process(bool force_validation, bool
|
|||||||
|
|
||||||
// Get the config ready. The binary gcode flag depends on Preferences, which the backend has no access to.
|
// Get the config ready. The binary gcode flag depends on Preferences, which the backend has no access to.
|
||||||
DynamicPrintConfig full_config = wxGetApp().preset_bundle->full_config();
|
DynamicPrintConfig full_config = wxGetApp().preset_bundle->full_config();
|
||||||
full_config.set("binary_gcode", bool(full_config.opt_bool("binary_gcode") & wxGetApp().app_config->get_bool("use_binary_gcode_when_supported")));
|
if (full_config.has("binary_gcode")) // needed for SLA
|
||||||
|
full_config.set("binary_gcode", bool(full_config.opt_bool("binary_gcode") & wxGetApp().app_config->get_bool("use_binary_gcode_when_supported")));
|
||||||
|
|
||||||
// If the update_background_process() was not called by the timer, kill the timer,
|
// If the update_background_process() was not called by the timer, kill the timer,
|
||||||
// so the update_restart_background_process() will not be called again in vain.
|
// so the update_restart_background_process() will not be called again in vain.
|
||||||
@ -6806,9 +6807,11 @@ void Plater::export_gcode(bool prefer_removable)
|
|||||||
_L("The following characters are not allowed by a FAT file system:") + " <>:/\\|?*\"";
|
_L("The following characters are not allowed by a FAT file system:") + " <>:/\\|?*\"";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool supports_binary = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_bool("binary_gcode");
|
if (this->printer_technology() == ptFFF) {
|
||||||
bool uses_binary = wxGetApp().app_config->get_bool("use_binary_gcode_when_supported");
|
bool supports_binary = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_bool("binary_gcode");
|
||||||
err_out = check_binary_vs_ascii_gcode_extension(printer_technology(), ext, supports_binary && uses_binary);
|
bool uses_binary = wxGetApp().app_config->get_bool("use_binary_gcode_when_supported");
|
||||||
|
err_out = check_binary_vs_ascii_gcode_extension(printer_technology(), ext, supports_binary && uses_binary);
|
||||||
|
}
|
||||||
return !err_out.IsEmpty();
|
return !err_out.IsEmpty();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -6816,7 +6819,7 @@ void Plater::export_gcode(bool prefer_removable)
|
|||||||
if (check_for_error(output_path, error_str)) {
|
if (check_for_error(output_path, error_str)) {
|
||||||
ErrorDialog(this, error_str, [this](const std::string& key) -> void { sidebar().jump_to_option(key); }).ShowModal();
|
ErrorDialog(this, error_str, [this](const std::string& key) -> void { sidebar().jump_to_option(key); }).ShowModal();
|
||||||
output_path.clear();
|
output_path.clear();
|
||||||
} else {
|
} else if (printer_technology() == ptFFF) {
|
||||||
bool supports_binary = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_bool("binary_gcode");
|
bool supports_binary = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_bool("binary_gcode");
|
||||||
bool uses_binary = wxGetApp().app_config->get_bool("use_binary_gcode_when_supported");
|
bool uses_binary = wxGetApp().app_config->get_bool("use_binary_gcode_when_supported");
|
||||||
alert_when_exporting_binary_gcode(supports_binary && uses_binary,
|
alert_when_exporting_binary_gcode(supports_binary && uses_binary,
|
||||||
@ -7369,7 +7372,7 @@ void Plater::send_gcode()
|
|||||||
PrintHostSendDialog dlg(default_output_file, upload_job.printhost->get_post_upload_actions(), groups, storage_paths, storage_names);
|
PrintHostSendDialog dlg(default_output_file, upload_job.printhost->get_post_upload_actions(), groups, storage_paths, storage_names);
|
||||||
if (dlg.ShowModal() == wxID_OK) {
|
if (dlg.ShowModal() == wxID_OK) {
|
||||||
|
|
||||||
{
|
if (printer_technology() == ptFFF) {
|
||||||
const std::string ext = boost::algorithm::to_lower_copy(dlg.filename().extension().string());
|
const std::string ext = boost::algorithm::to_lower_copy(dlg.filename().extension().string());
|
||||||
const bool binary_output = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_bool("binary_gcode") &&
|
const bool binary_output = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_bool("binary_gcode") &&
|
||||||
wxGetApp().app_config->get_bool("use_binary_gcode_when_supported");
|
wxGetApp().app_config->get_bool("use_binary_gcode_when_supported");
|
||||||
@ -7378,12 +7381,12 @@ void Plater::send_gcode()
|
|||||||
ErrorDialog(this, error_str, t_kill_focus([](const std::string& key) -> void { wxGetApp().sidebar().jump_to_option(key); })).ShowModal();
|
ErrorDialog(this, error_str, t_kill_focus([](const std::string& key) -> void { wxGetApp().sidebar().jump_to_option(key); })).ShowModal();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool supports_binary = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_bool("binary_gcode");
|
bool supports_binary = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_bool("binary_gcode");
|
||||||
bool uses_binary = wxGetApp().app_config->get_bool("use_binary_gcode_when_supported");
|
bool uses_binary = wxGetApp().app_config->get_bool("use_binary_gcode_when_supported");
|
||||||
alert_when_exporting_binary_gcode(supports_binary && uses_binary,
|
alert_when_exporting_binary_gcode(supports_binary && uses_binary,
|
||||||
wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_string("printer_notes"));
|
wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_string("printer_notes"));
|
||||||
|
}
|
||||||
|
|
||||||
upload_job.upload_data.upload_path = dlg.filename();
|
upload_job.upload_data.upload_path = dlg.filename();
|
||||||
upload_job.upload_data.post_action = dlg.post_action();
|
upload_job.upload_data.post_action = dlg.post_action();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user