Commit 36d2430d authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix an assert in continued mode of Transform Tool

The transformation arguments should be reset when the tool
refuses to start transformation on some kinds of layers
(e.g. vector layers). Otherwise, the args still keep the pointer
to the saved continued transformation, which might cause some
unexpected behavior.

BUG:392683
parent b50f1ead
......@@ -828,6 +828,10 @@ void KisToolTransform::startStroke(ToolTransformArgs::TransformMode mode, bool f
i18nc("floating message in transformation tool",
"Selected layer cannot be transformed with active transformation mode "),
koIcon("object-locked"), 4000, KisFloatingMessage::High);
// force-reset transform mode to default
initTransformMode(mode);
return;
}
......@@ -857,6 +861,9 @@ void KisToolTransform::startStroke(ToolTransformArgs::TransformMode mode, bool f
"Cannot transform empty layer "),
QIcon(), 1000, KisFloatingMessage::Medium);
// force-reset transform mode to default
initTransformMode(mode);
return;
}
......
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