Lab - Fixed loading of OpenMesh files without selection (#8832)

## Summary of Changes

A `Scene_polyhedron_selection_item` is created when loading an OpenMesh
file. When there was no selection inside the file, this selection item
was neither added to the scene nor deleted. Thus, it still received Qt
signals and caused crashes when the actual mesh was removed.

## Release Management

* Affected package(s): CGALlab
This commit is contained in:
Sebastien Loriot 2025-04-07 09:28:48 +02:00 committed by GitHub
commit b3d5e26c1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,8 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
res << item;
if(!selection_item->isEmpty())
res << selection_item;
else
delete selection_item;
return res;
}
}