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 stupid infinite loop when trying to update pass-through nodes

Dmitry Kazakovdcaf7fe2abf3
diff --git a/libs/image/kis_image.cc b/libs/image/kis_image.cc
index df09747678..97b731f87d 100644
--- a/libs/image/kis_image.cc
+++ b/libs/image/kis_image.cc
@@ -2151,10 +2151,10 @@ void KisImage::refreshGraphAsync(KisNodeSP root, const QVector<QRect> &rects, co
QVector<QRect> changeRects = requestedRects;
KisProjectionLeafSP leaf = root->projectionLeaf()->nextSibling();
while (leaf) {
- if (!leaf->shouldBeRendered()) continue;
-
- for (auto it = changeRects.begin(); it != changeRects.end(); ++it) {
- *it = leaf->projectionPlane()->changeRect(*it, leaf->node() == root ? KisNode::N_FILTHY : KisNode::N_ABOVE_FILTHY);
+ if (leaf->shouldBeRendered()) {
+ for (auto it = changeRects.begin(); it != changeRects.end(); ++it) {
+ *it = leaf->projectionPlane()->changeRect(*it, leaf->node() == root ? KisNode::N_FILTHY : KisNode::N_ABOVE_FILTHY);
+ }
}
leaf = leaf->nextSibling();