Check for unsaved presets before interactively loading an existing config file.

This commit is contained in:
Henrik Brix Andersen 2012-07-17 23:16:58 +02:00
parent de47f5fe72
commit 82cfc7c3d6

View File

@ -184,6 +184,7 @@ sub load_config {
my ($file) = @_; my ($file) = @_;
if (!$file) { if (!$file) {
return unless $self->check_unsaved_changes;
my $dir = $last_config ? dirname($last_config) : $last_config_dir || $last_skein_dir || ""; my $dir = $last_config ? dirname($last_config) : $last_config_dir || $last_skein_dir || "";
my $dlg = Wx::FileDialog->new($self, 'Select configuration to load:', $dir, "config.ini", my $dlg = Wx::FileDialog->new($self, 'Select configuration to load:', $dir, "config.ini",
$ini_wildcard, wxFD_OPEN | wxFD_FILE_MUST_EXIST); $ini_wildcard, wxFD_OPEN | wxFD_FILE_MUST_EXIST);