Commit d67d9292 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fix failing update when transforming a shape layer with a Transform Tool

That was actually a race condition, so it was rather difficult
to reproduce.

BUG:437886
parent dd5f1daa
......@@ -517,6 +517,20 @@ void TransformStrokeStrategy::finishStrokeImpl(bool applyTransform, const ToolTr
QVector<KisStrokeJobData *> mutatedJobs;
/**
* We should make the shape layers visible **before** transforming them,
* otherwise the setDirty() call issued by KisShapeLayerCavas::repaint()
* may be lost.
*/
KritaUtils::addJobBarrier(mutatedJobs, [this, applyTransform]() {
Q_FOREACH (KisNodeSP node, m_hiddenProjectionLeaves) {
node->projectionLeaf()->setTemporaryHiddenFromRendering(false);
if (!applyTransform) {
node->setDirty();
}
}
});
if (applyTransform) {
m_savedTransformArgs = args;
......@@ -535,13 +549,6 @@ void TransformStrokeStrategy::finishStrokeImpl(bool applyTransform, const ToolTr
selection->setVisible(true);
}
Q_FOREACH (KisNodeSP node, m_hiddenProjectionLeaves) {
node->projectionLeaf()->setTemporaryHiddenFromRendering(false);
if (!applyTransform) {
node->setDirty();
}
}
if (m_deactivatedOverlaySelectionMask) {
m_deactivatedOverlaySelectionMask->selection()->setVisible(true);
m_deactivatedOverlaySelectionMask->setDirty();
......
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