mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
Ported expanded_output_filepath() to C++/XS
This commit is contained in:
parent
66493ce821
commit
6a90fceaaf
8 changed files with 42 additions and 47 deletions
|
@ -440,7 +440,7 @@ sub quick_slice {
|
|||
if ($params{reslice}) {
|
||||
$output_file = $qs_last_output_file if defined $qs_last_output_file;
|
||||
} elsif ($params{save_as}) {
|
||||
$output_file = $sprint->expanded_output_filepath;
|
||||
$output_file = $sprint->output_filepath;
|
||||
$output_file =~ s/\.gcode$/.svg/i if $params{export_svg};
|
||||
my $dlg = Wx::FileDialog->new($self, 'Save ' . ($params{export_svg} ? 'SVG' : 'G-code') . ' file as:',
|
||||
wxTheApp->output_path(dirname($output_file)),
|
||||
|
|
|
@ -1298,9 +1298,9 @@ sub export_gcode {
|
|||
|
||||
# select output file
|
||||
if ($output_file) {
|
||||
$self->{export_gcode_output_file} = $self->{print}->expanded_output_filepath($output_file);
|
||||
$self->{export_gcode_output_file} = $self->{print}->output_filepath($output_file);
|
||||
} else {
|
||||
my $default_output_file = $self->{print}->expanded_output_filepath($main::opt{output});
|
||||
my $default_output_file = $self->{print}->output_filepath($main::opt{output});
|
||||
my $dlg = Wx::FileDialog->new($self, 'Save G-code file as:', wxTheApp->output_path(dirname($default_output_file)),
|
||||
basename($default_output_file), &Slic3r::GUI::FILE_WILDCARDS->{gcode}, wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
||||
if ($dlg->ShowModal != wxID_OK) {
|
||||
|
@ -1571,7 +1571,7 @@ sub _get_export_file {
|
|||
|
||||
my $output_file = $main::opt{output};
|
||||
{
|
||||
$output_file = $self->{print}->expanded_output_filepath($output_file);
|
||||
$output_file = $self->{print}->output_filepath($output_file);
|
||||
$output_file =~ s/\.gcode$/$suffix/i;
|
||||
my $dlg = Wx::FileDialog->new($self, "Save $format file as:", dirname($output_file),
|
||||
basename($output_file), &Slic3r::GUI::MODEL_WILDCARD, wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue