mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
More incomplete work
This commit is contained in:
parent
b20caa4e31
commit
7387e60706
5 changed files with 197 additions and 102 deletions
|
@ -18,7 +18,8 @@ use Slic3r::GUI::Tab;
|
|||
|
||||
our $have_OpenGL = eval "use Slic3r::GUI::PreviewCanvas; 1";
|
||||
|
||||
use Wx 0.9901 qw(:bitmap :dialog :frame :icon :id :misc :systemsettings :toplevelwindow);
|
||||
use Wx 0.9901 qw(:bitmap :dialog :frame :icon :id :misc :systemsettings :toplevelwindow
|
||||
:filedialog);
|
||||
use Wx::Event qw(EVT_CLOSE EVT_MENU EVT_IDLE);
|
||||
use base 'Wx::App';
|
||||
|
||||
|
@ -349,6 +350,25 @@ sub output_path {
|
|||
: $dir;
|
||||
}
|
||||
|
||||
sub open_model {
|
||||
my ($self) = @_;
|
||||
|
||||
my $dir = $Slic3r::GUI::Settings->{recent}{skein_directory}
|
||||
|| $Slic3r::GUI::Settings->{recent}{config_directory}
|
||||
|| '';
|
||||
|
||||
my $dialog = Wx::FileDialog->new($self, 'Choose one or more files (STL/OBJ/AMF):', $dir, "",
|
||||
&Slic3r::GUI::SkeinPanel::MODEL_WILDCARD, wxFD_OPEN | wxFD_MULTIPLE | wxFD_FILE_MUST_EXIST);
|
||||
if ($dialog->ShowModal != wxID_OK) {
|
||||
$dialog->Destroy;
|
||||
return;
|
||||
}
|
||||
my @input_files = $dialog->GetPaths;
|
||||
$dialog->Destroy;
|
||||
|
||||
return @input_files;
|
||||
}
|
||||
|
||||
sub CallAfter {
|
||||
my $class = shift;
|
||||
my ($cb) = @_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue