mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH: add confirm dialog for cancel-print button
Change-Id: I0a97c7a3122b1b5dd0b306212292e8c51b9acd9b
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "slic3r/Utils/Http.hpp"
|
||||
#include "libslic3r/Thread.hpp"
|
||||
#include "RecenterDialog.hpp"
|
||||
#include "ConfirmHintDialog.hpp"
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
@@ -1222,7 +1223,13 @@ void StatusPanel::on_subtask_pause_resume(wxCommandEvent &event)
|
||||
|
||||
void StatusPanel::on_subtask_abort(wxCommandEvent &event)
|
||||
{
|
||||
if (obj) obj->command_task_abort();
|
||||
ConfirmHintDialog* abort_dlg = new ConfirmHintDialog(this, wxID_ANY, _L("Cancel print"));
|
||||
abort_dlg->SetHint(_L("Are you sure you want to cancel this print?"));
|
||||
abort_dlg->Bind(EVT_CONFIRM_HINT, [this](wxCommandEvent &e) {
|
||||
if (obj) obj->command_task_abort();
|
||||
});
|
||||
if(abort_dlg->ShowModal())
|
||||
delete abort_dlg;
|
||||
}
|
||||
|
||||
void StatusPanel::error_info_reset()
|
||||
|
||||
Reference in New Issue
Block a user