Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix extra updates when merging two layers below a layer with a mask

Dmitry Kazakov0e425d5f7ba4
diff --git a/libs/image/commands/kis_image_command.cpp b/libs/image/commands/kis_image_command.cpp
index 82ff4bb4c0..fcaa74de15 100644
--- a/libs/image/commands/kis_image_command.cpp
+++ b/libs/image/commands/kis_image_command.cpp
@@ -61,12 +61,14 @@ void KisImageCommand::UpdateTarget::update() {
}
if (node) {
- node->setDirty(m_updateRect);
+ KisImageSP image = m_image.toStrongRef();
+ if (image) {
+ image->requestProjectionUpdate(node.data(), {m_updateRect}, KisProjectionUpdateFlag::NoFilthy);
+ }
} else {
KisImageSP image = m_image.toStrongRef();
if (image) {
- image->refreshGraphAsync(m_removedNodeParent);
- m_removedNodeParent->setDirty(m_updateRect);
+ image->refreshGraphAsync(m_removedNodeParent, KisProjectionUpdateFlag::NoFilthy);
}
}
}