mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed deleting item after saving result of scene in photo editor.
This commit is contained in:
parent
953fa52490
commit
f567328a60
1 changed files with 3 additions and 0 deletions
|
@ -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({});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue