Fixed deleting item after saving result of scene in photo editor.

This commit is contained in:
23rd 2021-07-04 17:23:33 +03:00
parent 953fa52490
commit f567328a60

View file

@ -66,6 +66,9 @@ void Scene::removeItem(not_null<QGraphicsItem*> item) {
}
void Scene::removeItem(const ItemPtr &item) {
// Scene loses ownership of an item.
QGraphicsScene::removeItem(item.get());
_items.erase(ranges::remove(_items, item), end(_items));
_removesItem.fire({});
}