add some copies in the copy constructor to fix crash of cloning colored items

This commit is contained in:
Maxime Gimeno 2019-12-13 12:12:51 +01:00
parent fb25130e6a
commit 504a3ad0f5
1 changed files with 4 additions and 1 deletions

View File

@ -102,7 +102,10 @@ struct Scene_surface_mesh_item_priv{
Scene_surface_mesh_item_priv(const Scene_surface_mesh_item& other, Scene_surface_mesh_item* parent):
smesh_(new SMesh(*other.d->smesh_)),
idx_data_(other.d->idx_data_),
idx_edge_data_(other.d->idx_edge_data_)
idx_edge_data_(other.d->idx_edge_data_),
fpatch_id_map(other.d->fpatch_id_map),
min_patch_id(other.d->min_patch_id),
colors_(other.d->colors_)
{
item = parent;
item->setTriangleContainer(1, new Triangle_container(VI::PROGRAM_WITH_LIGHT,