mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-28 03:25:30 -05:00
Remove expensive calls to QGraphicsItemGroup::removefromGroup
This commit is contained in:
@@ -1673,10 +1673,9 @@ void Editor::clearMapEvents() {
|
||||
if (events_group->scene()) {
|
||||
events_group->scene()->removeItem(events_group);
|
||||
}
|
||||
for (QGraphicsItem *child : events_group->childItems()) {
|
||||
events_group->removeFromGroup(child);
|
||||
delete child;
|
||||
}
|
||||
// events_group does not own its children, the childrens' parent
|
||||
// is set to the group's parent (and our group has no parent).
|
||||
qDeleteAll(events_group->childItems());
|
||||
delete events_group;
|
||||
events_group = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user