Fixed selection of items on mode switching.

This commit is contained in:
23rd 2021-03-21 20:07:52 +03:00
parent c5c707f0fd
commit 36e5056b59

View file

@ -171,6 +171,8 @@ std::shared_ptr<Scene> Paint::saveScene() const {
}
void Paint::cancel() {
_scene->clearSelection();
const auto filtered = _scene->items(Qt::AscendingOrder);
if (filtered.empty()) {
return;
@ -192,6 +194,8 @@ void Paint::cancel() {
}
void Paint::keepResult() {
_scene->clearSelection();
for (const auto &item : _itemsToRemove) {
_scene->removeItem(item);
}