mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 05:07:51 -06:00
When loading an AMF file having multiple objects that look like multiple parts of a single object, prompt user and ask how to consider it. #2970
Conflicts: lib/Slic3r/Model.pm
This commit is contained in:
parent
dfb1ec99ac
commit
dd879c3ef2
4 changed files with 40 additions and 2 deletions
|
@ -523,6 +523,16 @@ sub load_file {
|
|||
Slic3r::GUI::show_error($self, $@) if $@;
|
||||
|
||||
if (defined $model) {
|
||||
if ($model->looks_like_multipart_object) {
|
||||
my $dialog = Wx::MessageDialog->new($self,
|
||||
"This file contains several objects positioned at multiple heights. "
|
||||
. "Instead of considering them as multiple objects, should I consider\n"
|
||||
. "this file as a single object having multiple parts?\n",
|
||||
'Multi-part object detected', wxICON_WARNING | wxYES | wxNO);
|
||||
if ($dialog->ShowModal() == wxID_YES) {
|
||||
$model->convert_multipart_object;
|
||||
}
|
||||
}
|
||||
$self->load_model_objects(@{$model->objects});
|
||||
$self->statusbar->SetStatusText("Loaded " . basename($input_file));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue