mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 20:26:00 +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;
|
my $self = shift;
|
||||||
|
|
||||||
if (defined $self->{dirty}) {
|
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);
|
$self->set_dirty(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user