Check for unsaved presets before interactively loading an existing config file.
This commit is contained in:
parent
de47f5fe72
commit
82cfc7c3d6
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user