mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 06:33:57 -06:00
FIX: [STUDIO-2768] delete file confirm
Change-Id: I0e4c81d7a4b312e5b1c339c5652ac4a68298910e
This commit is contained in:
parent
14836c5f4a
commit
1483d75848
1 changed files with 7 additions and 1 deletions
|
@ -424,10 +424,16 @@ void Slic3r::GUI::MediaFilePanel::doAction(size_t index, int action)
|
||||||
if (action == 0) {
|
if (action == 0) {
|
||||||
if (fs->GetSelectCount() > 1) {
|
if (fs->GetSelectCount() > 1) {
|
||||||
MessageDialog dlg(this,
|
MessageDialog dlg(this,
|
||||||
wxString::Format(_L("You are going to delete %u files. Are you sure to continue?"), fs->GetSelectCount()),
|
wxString::Format(_L("You are going to delete %u files from printer. Are you sure to continue?"), fs->GetSelectCount()),
|
||||||
_L("Delete files"), wxYES_NO | wxICON_WARNING);
|
_L("Delete files"), wxYES_NO | wxICON_WARNING);
|
||||||
if (dlg.ShowModal() != wxID_YES)
|
if (dlg.ShowModal() != wxID_YES)
|
||||||
return;
|
return;
|
||||||
|
} else if (index >= 0) {
|
||||||
|
MessageDialog dlg(this,
|
||||||
|
wxString::Format(_L("Do you want to delete the file '%s' from printer?"), fs->GetSelectCount()),
|
||||||
|
_L("Delete file"), wxYES_NO | wxICON_WARNING);
|
||||||
|
if (dlg.ShowModal() != wxID_YES)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
fs->DeleteFiles(index);
|
fs->DeleteFiles(index);
|
||||||
} else if (action == 1) {
|
} else if (action == 1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue