Commit 74fa45b3 authored by Boudewijn Rempt's avatar Boudewijn Rempt

BUG:351193 Don't hang when isolating a layer during a stroke

Thanks to Dmitry for the hint that fixed the issue.
parent 4766112c
......@@ -1508,15 +1508,18 @@ KisStrokeId KisImage::startStroke(KisStrokeStrategy *strokeStrategy)
return id;
}
void KisImage::startIsolatedMode(KisNodeSP node)
bool KisImage::startIsolatedMode(KisNodeSP node)
{
barrierLock();
if (!tryBarrierLock()) return false;
unlock();
m_d->isolatedRootNode = node;
emit sigIsolatedModeChanged();
notifyProjectionUpdated(bounds());
return true;
}
void KisImage::stopIsolatedMode()
......
......@@ -524,7 +524,7 @@ public:
void notifyNodeCollpasedChanged();
public:
void startIsolatedMode(KisNodeSP node);
bool startIsolatedMode(KisNodeSP node);
void stopIsolatedMode();
KisNodeSP isolatedModeRoot() const;
......
......@@ -443,8 +443,10 @@ void KisNodeManager::toggleIsolateMode(bool checked)
// Transform masks don't have pixel data...
if (activeNode->inherits("KisTransformMask")) return;
KIS_ASSERT_RECOVER_RETURN(activeNode);
image->startIsolatedMode(activeNode);
if (!image->startIsolatedMode(activeNode)) {
KisAction *action = m_d->view->actionManager()->actionByName("isolate_layer");
action->setChecked(false);
}
} else {
image->stopIsolatedMode();
}
......
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