Commit 9d832b4d authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fix update when cancelling continued transform of a transform mask

If the user cancels a continued transform in IP mode, then the "new"
updates were not added to the update list. Therefore, only the initial
area was updated.
parent 925c4757
......@@ -590,10 +590,16 @@ void InplaceTransformStrokeStrategy::fetchAllUpdateRequests(int levelOfDetail, K
*updateData = (prevDirtyRects | dirtyRects).compressed();
if (levelOfDetail <= 0) {
*m_d->updateDataForUndo = (m_d->initialUpdatesBeforeClear | dirtyRects).compressed();
KisBatchNodeUpdate savedUndoRects = dirtyRects;
if (levelOfDetail > 0) {
for (auto it = savedUndoRects.begin(); it != savedUndoRects.end(); ++it) {
it->second = KisLodTransform::upscaledRect(it->second, levelOfDetail);
}
}
*m_d->updateDataForUndo = (m_d->initialUpdatesBeforeClear | savedUndoRects).compressed();
prevDirtyRects.clear();
dirtyRects.swap(prevDirtyRects);
}
......@@ -964,6 +970,7 @@ void InplaceTransformStrokeStrategy::cancelAction(QVector<KisStrokeJobData *> &m
if (m_d->initialTransformArgs.isIdentity()) {
KritaUtils::addJobBarrier(mutatedJobs, [this]() {
m_d->commandUpdatesBlockerCookie.reset();
undoTransformCommands(0);
undoAllCommands();
});
......
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