Commit 04a7131f authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Make sure transform tool cannot be triggered for a dropped transform mask

When a mask is applied to a pass-through group, it is dropped from the
rendering tree. So it is not possible to trigger transform tool for that.

BUG:447506
parent f7edc12c
Pipeline #118991 skipped with stage
......@@ -292,6 +292,15 @@ void InplaceTransformStrokeStrategy::initStrokeCallback()
m_d->rootNode = KisTransformUtils::tryOverrideRootToTransformMask(m_d->rootNode);
if (m_d->rootNode->inherits("KisTransformMask") && m_d->rootNode->projectionLeaf()->isDroppedNode()) {
m_d->rootNode.clear();
m_d->processedNodes.clear();
TransformTransactionProperties transaction(QRect(), &m_d->initialTransformArgs, m_d->rootNode, m_d->processedNodes);
Q_EMIT sigTransactionGenerated(transaction, m_d->initialTransformArgs, this);
return;
}
// When placing an external source image, we never work recursively on any layer masks
m_d->processedNodes = KisTransformUtils::fetchNodesList(m_d->mode, m_d->rootNode, m_d->externalSource);
......
......@@ -403,6 +403,15 @@ void TransformStrokeStrategy::initStrokeCallback()
m_rootNode = KisTransformUtils::tryOverrideRootToTransformMask(m_rootNode);
if (m_rootNode->inherits("KisTransformMask") && m_rootNode->projectionLeaf()->isDroppedNode()) {
m_rootNode.clear();
m_processedNodes.clear();
TransformTransactionProperties transaction(QRect(), &m_initialTransformArgs, m_rootNode, m_processedNodes);
Q_EMIT sigTransactionGenerated(transaction, m_initialTransformArgs, this);
return;
}
ToolTransformArgs initialTransformArgs;
bool isExternalSourcePresent = false;
m_processedNodes = KisTransformUtils::fetchNodesList(m_mode, m_rootNode, isExternalSourcePresent);
......
Supports Markdown
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