mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Merge branch 'master' into sender
Conflicts: Build.PL lib/Slic3r.pm xs/MANIFEST xs/src/libslic3r/PrintConfig.hpp
This commit is contained in:
commit
9b21ac877a
93 changed files with 3339 additions and 2050 deletions
|
@ -11,8 +11,8 @@ use Wx qw(:frame :bitmap :id :misc :notebook :panel :sizer :menu :dialog :filedi
|
|||
use Wx::Event qw(EVT_CLOSE EVT_MENU);
|
||||
use base 'Wx::Frame';
|
||||
|
||||
our $last_input_file;
|
||||
our $last_output_file;
|
||||
our $qs_last_input_file;
|
||||
our $qs_last_output_file;
|
||||
our $last_config;
|
||||
|
||||
sub new {
|
||||
|
@ -197,7 +197,8 @@ sub _init_menubar {
|
|||
$self->repair_stl;
|
||||
}, undef, 'wrench.png');
|
||||
$fileMenu->AppendSeparator();
|
||||
$self->_append_menu_item($fileMenu, "Preferences…", 'Application preferences', sub {
|
||||
# Cmd+, is standard on OS X - what about other operating systems?
|
||||
$self->_append_menu_item($fileMenu, "Preferences…\tCtrl+,", 'Application preferences', sub {
|
||||
Slic3r::GUI::Preferences->new($self)->ShowModal;
|
||||
}, wxID_PREFERENCES);
|
||||
$fileMenu->AppendSeparator();
|
||||
|
@ -321,19 +322,19 @@ sub quick_slice {
|
|||
}
|
||||
$input_file = Slic3r::decode_path($dialog->GetPaths);
|
||||
$dialog->Destroy;
|
||||
$last_input_file = $input_file unless $params{export_svg};
|
||||
$qs_last_input_file = $input_file unless $params{export_svg};
|
||||
} else {
|
||||
if (!defined $last_input_file) {
|
||||
if (!defined $qs_last_input_file) {
|
||||
Wx::MessageDialog->new($self, "No previously sliced file.",
|
||||
'Error', wxICON_ERROR | wxOK)->ShowModal();
|
||||
return;
|
||||
}
|
||||
if (! -e $last_input_file) {
|
||||
Wx::MessageDialog->new($self, "Previously sliced file ($last_input_file) not found.",
|
||||
if (! -e $qs_last_input_file) {
|
||||
Wx::MessageDialog->new($self, "Previously sliced file ($qs_last_input_file) not found.",
|
||||
'File Not Found', wxICON_ERROR | wxOK)->ShowModal();
|
||||
return;
|
||||
}
|
||||
$input_file = $last_input_file;
|
||||
$input_file = $qs_last_input_file;
|
||||
}
|
||||
my $input_file_basename = basename($input_file);
|
||||
$Slic3r::GUI::Settings->{recent}{skein_directory} = dirname($input_file);
|
||||
|
@ -368,19 +369,19 @@ sub quick_slice {
|
|||
# select output file
|
||||
my $output_file;
|
||||
if ($params{reslice}) {
|
||||
$output_file = $last_output_file if defined $last_output_file;
|
||||
$output_file = $qs_last_output_file if defined $qs_last_output_file;
|
||||
} elsif ($params{save_as}) {
|
||||
$output_file = $sprint->expanded_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)),
|
||||
basename($output_file), $params{export_svg} ? &Slic3r::GUI::FILE_WILDCARDS->{svg} : &Slic3r::GUI::FILE_WILDCARDS->{gcode}, wxFD_SAVE);
|
||||
basename($output_file), $params{export_svg} ? &Slic3r::GUI::FILE_WILDCARDS->{svg} : &Slic3r::GUI::FILE_WILDCARDS->{gcode}, wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
||||
if ($dlg->ShowModal != wxID_OK) {
|
||||
$dlg->Destroy;
|
||||
return;
|
||||
}
|
||||
$output_file = Slic3r::decode_path($dlg->GetPath);
|
||||
$last_output_file = $output_file unless $params{export_svg};
|
||||
$qs_last_output_file = $output_file unless $params{export_svg};
|
||||
$Slic3r::GUI::Settings->{_}{last_output_path} = dirname($output_file);
|
||||
wxTheApp->save_settings;
|
||||
$dlg->Destroy;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue