Fix segfault when sending elements to front/back of multiple layers

This commit is contained in:
Yousef Khadadeh 2026-02-02 13:36:52 +03:00
parent e750d857da
commit b5c3c77a95

View file

@ -140,6 +140,7 @@ void DrawingProgramLayerManager::push_components_to(const std::vector<CanvasComp
toInsert.back().second.reassign_ids(); toInsert.back().second.reassign_ids();
} }
components->insert_ordered_list_and_send_create(components, toInsert); components->insert_ordered_list_and_send_create(components, toInsert);
toEraseList.clear();
}; };
for(auto& obj : objs) { for(auto& obj : objs) {
if(parentLayer != obj->obj->parentLayer) { if(parentLayer != obj->obj->parentLayer) {