Merge branch 'dk_copy_file' into master

This commit is contained in:
David Kocik 2020-12-01 13:05:31 +01:00
commit 27243c0785

View file

@ -3640,7 +3640,8 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
// Reset the "export G-code path" name, so that the automatic background processing will be enabled again.
this->background_process.reset_export();
// This bool stops showing export finished notification even when process_completed_with_error is false
bool has_error = false;
if (evt.error()) {
std::string message = evt.format_error_message();
if (evt.critical_error()) {
@ -3660,7 +3661,7 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
sidebar->set_btn_label(btn, invalid_str);
process_completed_with_error = true;
}
has_error = true;
}
if (evt.cancelled())
this->statusbar()->set_status_text(_L("Cancelled"));
@ -3695,11 +3696,11 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
show_action_buttons(false);
}
// If writing to removable drive was scheduled, show notification with eject button
if (exporting_status == ExportingStatus::EXPORTING_TO_REMOVABLE && !this->process_completed_with_error) {
if (exporting_status == ExportingStatus::EXPORTING_TO_REMOVABLE && !has_error) {
show_action_buttons(false);
notification_manager->push_exporting_finished_notification(*q->get_current_canvas3D(), last_output_path, last_output_dir_path, true);
wxGetApp().removable_drive_manager()->set_exporting_finished(true);
}else if (exporting_status == ExportingStatus::EXPORTING_TO_LOCAL && !this->process_completed_with_error)
}else if (exporting_status == ExportingStatus::EXPORTING_TO_LOCAL && !has_error)
notification_manager->push_exporting_finished_notification(*q->get_current_canvas3D(), last_output_path, last_output_dir_path, false);
}
exporting_status = ExportingStatus::NOT_EXPORTING;