Scoping error caused the Unsaved Changes dialog not to be shown when closing the main window
This commit is contained in:
parent
c1e44eb591
commit
959eb60ad0
1 changed files with 5 additions and 1 deletions
|
@ -673,7 +673,11 @@ sub config {
|
|||
sub check_unsaved_changes {
|
||||
my $self = shift;
|
||||
|
||||
my @dirty = map $_->title, grep $_->is_dirty, values %{$self->{options_tabs}};
|
||||
my @dirty = ();
|
||||
foreach my $tab (values %{$self->{options_tabs}}) {
|
||||
push @dirty, $tab->title if $tab->is_dirty;
|
||||
}
|
||||
|
||||
if (@dirty) {
|
||||
my $titles = join ', ', @dirty;
|
||||
my $confirm = Wx::MessageDialog->new($self, "You have unsaved changes ($titles). Discard changes and continue anyway?",
|
||||
|
|
Loading…
Add table
Reference in a new issue