mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 11:02:08 +00: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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user