mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 04:55:55 +08:00
Ask for confirmation when deselecting a dirty preset.
This commit is contained in:
parent
848784ad95
commit
9e1308c03f
@ -142,7 +142,12 @@ sub on_select_preset {
|
||||
my $self = shift;
|
||||
|
||||
if (defined $self->{dirty}) {
|
||||
# TODO: prompt user?
|
||||
my $confirm = Wx::MessageDialog->new($self, 'You have unsaved changes. Discard changes and continue anyway?',
|
||||
'Unsaved Changes', wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION);
|
||||
if ($confirm->ShowModal == wxID_NO) {
|
||||
$self->{presets_choice}->SetSelection($self->{dirty});
|
||||
return;
|
||||
}
|
||||
$self->set_dirty(0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user