diff --git a/core_lib/src/canvaspainter.cpp b/core_lib/src/canvaspainter.cpp index 3990e3920..ef6c21221 100644 --- a/core_lib/src/canvaspainter.cpp +++ b/core_lib/src/canvaspainter.cpp @@ -315,7 +315,8 @@ void CanvasPainter::paintCurrentBitmapFrame(QPainter& painter, const QRect& blit } // We do not wish to draw selection transformations on anything but the current layer - if (isCurrentLayer && mRenderTransform) { + Q_ASSERT(!isDrawing || mSelectionTransform.isIdentity()); + if (isCurrentLayer && mRenderTransform && !isDrawing) { paintTransformedSelection(currentBitmapPainter, paintedImage, mSelection); } diff --git a/core_lib/src/managers/toolmanager.cpp b/core_lib/src/managers/toolmanager.cpp index 14233ec79..25c6ef2b5 100644 --- a/core_lib/src/managers/toolmanager.cpp +++ b/core_lib/src/managers/toolmanager.cpp @@ -412,7 +412,10 @@ void ToolManager::setTemporaryTool(ToolType eToolType) void ToolManager::clearTemporaryTool() { - mTemporaryTool = nullptr; + if (mTemporaryTool) { + mTemporaryTool->leavingThisTool(); + mTemporaryTool = nullptr; + } mTemporaryTriggerKeys = {}; mTemporaryTriggerModifiers = Qt::NoModifier; mTemporaryTriggerMouseButtons = Qt::NoButton;