mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fixed deleting item after saving result of scene in photo editor.
This commit is contained in:
@@ -66,6 +66,9 @@ void Scene::removeItem(not_null<QGraphicsItem*> item) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Scene::removeItem(const ItemPtr &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));
|
_items.erase(ranges::remove(_items, item), end(_items));
|
||||||
_removesItem.fire({});
|
_removesItem.fire({});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user