Include preset name in confirmation dialog
This commit is contained in:
parent
9e1308c03f
commit
9f719d42bc
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue