mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-11 14:22:54 +02:00
Automatic selection of newly loaded objects
This commit is contained in:
1 parent
c4d5c7cefd
commit
d426895580
1 file changed
+11
@@ -1503,6 +1503,17 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
statusbar()->set_status_text(_(L("Loaded")));
|
||||
}
|
||||
|
||||
// automatic selection of added objects
|
||||
if (!obj_idxs.empty() && (view3D != nullptr))
|
||||
{
|
||||
GLCanvas3D::Selection& selection = view3D->get_canvas3d()->get_selection();
|
||||
selection.clear();
|
||||
for (size_t idx : obj_idxs)
|
||||
{
|
||||
selection.add_object((unsigned int)idx, false);
|
||||
}
|
||||
}
|
||||
|
||||
return obj_idxs;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user