mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
ENH: add confirm dialog for cancel-print button
Change-Id: I0a97c7a3122b1b5dd0b306212292e8c51b9acd9b
This commit is contained in:
parent
1b4486cc5d
commit
8386b48554
5 changed files with 40 additions and 33 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue