Cleanup the --output-filename-format implementation. #53 #137

This commit is contained in:
Alessandro Ranellucci 2011-12-26 17:20:26 +01:00
parent 1071b556cb
commit f9446b9c6e
5 changed files with 79 additions and 40 deletions

View file

@ -154,6 +154,7 @@ sub do_slice {
my $skein = Slic3r::Skein->new(
input_file => $input_file,
output_file => $main::opt{output},
status_cb => sub {
my ($percent, $message) = @_;
if (&Wx::wxVERSION_STRING =~ / 2\.(8\.|9\.[2-9])/) {
@ -163,11 +164,8 @@ sub do_slice {
);
# select output file
my $output_file = $main::opt{output_filename};
if ($params{save_as}) {
if (!$output_file) {
$output_file = $skein->get_output_filename($input_file);
}
my $output_file = $skein->expanded_output_filepath;
my $dlg = Wx::FileDialog->new($self, 'Save gcode file as:', dirname($output_file),
basename($output_file), $gcode_wildcard, wxFD_SAVE);
return if $dlg->ShowModal != wxID_OK;