Commit 9d0523e6 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix a bug in KisLayer::changeRect() caught by KisWalkersTest

When a layer is filthy we know that nothing has changed below it, so if
the masks crop the changed rect, there is no reason for further update.

Thanks 6-years-old KisWalkersTest for catching it!
parent 67ad27cc
......@@ -655,7 +655,10 @@ QRect KisLayer::changeRect(const QRect &rect, PositionToFilthy pos) const
}
// TODO: string comparizon: optimize!
if (compositeOpId() != COMPOSITE_COPY) {
if (pos != KisNode::N_FILTHY &&
pos != KisNode::N_FILTHY_PROJECTION &&
compositeOpId() != COMPOSITE_COPY) {
changeRect |= rect;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment