Enforce prompt when overwriting G-code files. #398

This commit is contained in:
Alessandro Ranellucci 2012-05-30 11:55:46 +02:00
parent 949055d86c
commit 5eae22f8b0
2 changed files with 2 additions and 2 deletions

View file

@ -561,7 +561,7 @@ sub export_stl {
$output_file = $print->expanded_output_filepath($output_file);
$output_file =~ s/\.gcode$/.stl/i;
my $dlg = Wx::FileDialog->new($self, 'Save STL file as:', dirname($output_file),
basename($output_file), $Slic3r::GUI::SkeinPanel::model_wildcard, wxFD_SAVE);
basename($output_file), $Slic3r::GUI::SkeinPanel::model_wildcard, wxFD_SAVE | &Wx::wxFD_OVERWRITE_PROMPT);
if ($dlg->ShowModal != wxID_OK) {
$dlg->Destroy;
return;

View file

@ -294,7 +294,7 @@ sub save_config {
my $dir = $last_config ? dirname($last_config) : $last_config_dir || $last_skein_dir || "";
my $filename = $last_config ? basename($last_config) : "config.ini";
my $dlg = Wx::FileDialog->new($self, 'Save configuration as:', $dir, $filename,
$ini_wildcard, wxFD_SAVE);
$ini_wildcard, wxFD_SAVE | &Wx::wxFD_OVERWRITE_PROMPT);
if ($dlg->ShowModal == wxID_OK) {
my $file = $dlg->GetPath;
$last_config_dir = dirname($file);