mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 18:49:05 +08:00
Include preset name in confirmation dialog
This commit is contained in:
parent
9e1308c03f
commit
9f719d42bc
@ -142,7 +142,8 @@ sub on_select_preset {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
if (defined $self->{dirty}) {
|
if (defined $self->{dirty}) {
|
||||||
my $confirm = Wx::MessageDialog->new($self, 'You have unsaved changes. Discard changes and continue anyway?',
|
my $name = $self->{dirty} == 0 ? 'Default preset' : "Preset \"$self->{presets}[$self->{dirty}]{name}\"";
|
||||||
|
my $confirm = Wx::MessageDialog->new($self, "$name has unsaved changes. Discard changes and continue anyway?",
|
||||||
'Unsaved Changes', wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION);
|
'Unsaved Changes', wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION);
|
||||||
if ($confirm->ShowModal == wxID_NO) {
|
if ($confirm->ShowModal == wxID_NO) {
|
||||||
$self->{presets_choice}->SetSelection($self->{dirty});
|
$self->{presets_choice}->SetSelection($self->{dirty});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user