mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 15:46:00 +08:00
Stop export on invalid plater
This commit is contained in:
parent
9ea3b1356e
commit
4028ec8ec5
@ -3234,21 +3234,29 @@ void Plater::priv::export_gcode(fs::path output_path, bool output_path_on_remova
|
|||||||
{
|
{
|
||||||
wxCHECK_RET(!(output_path.empty() && upload_job.empty()), "export_gcode: output_path and upload_job empty");
|
wxCHECK_RET(!(output_path.empty() && upload_job.empty()), "export_gcode: output_path and upload_job empty");
|
||||||
|
|
||||||
if (model.objects.empty())
|
if (model.objects.empty()) {
|
||||||
|
exporting_status = ExportingStatus::NOT_EXPORTING;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (background_process.is_export_scheduled()) {
|
if (background_process.is_export_scheduled()) {
|
||||||
GUI::show_error(q, _L("Another export job is currently running."));
|
GUI::show_error(q, _L("Another export job is currently running."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process_completed_with_error) {
|
||||||
|
exporting_status = ExportingStatus::NOT_EXPORTING;
|
||||||
|
return;
|
||||||
|
}
|
||||||
// bitmask of UpdateBackgroundProcessReturnState
|
// bitmask of UpdateBackgroundProcessReturnState
|
||||||
unsigned int state = update_background_process(true);
|
unsigned int state = update_background_process(true);
|
||||||
if (state & priv::UPDATE_BACKGROUND_PROCESS_REFRESH_SCENE)
|
if (state & priv::UPDATE_BACKGROUND_PROCESS_REFRESH_SCENE)
|
||||||
view3D->reload_scene(false);
|
view3D->reload_scene(false);
|
||||||
|
|
||||||
if ((state & priv::UPDATE_BACKGROUND_PROCESS_INVALID) != 0)
|
if ((state & priv::UPDATE_BACKGROUND_PROCESS_INVALID) != 0) {
|
||||||
|
exporting_status = ExportingStatus::NOT_EXPORTING;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
show_warning_dialog = true;
|
show_warning_dialog = true;
|
||||||
if (! output_path.empty()) {
|
if (! output_path.empty()) {
|
||||||
@ -5646,11 +5654,10 @@ void Plater::export_gcode(bool prefer_removable)
|
|||||||
if (canvas3D()->get_gizmos_manager().is_in_editing_mode(true))
|
if (canvas3D()->get_gizmos_manager().is_in_editing_mode(true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
select_view_3D("Preview");
|
|
||||||
|
|
||||||
if (p->process_completed_with_error)
|
if (p->process_completed_with_error)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
select_view_3D("Preview");
|
||||||
|
|
||||||
// If possible, remove accents from accented latin characters.
|
// If possible, remove accents from accented latin characters.
|
||||||
// This function is useful for generating file names to be processed by legacy firmwares.
|
// This function is useful for generating file names to be processed by legacy firmwares.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user