Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Make edit shapes tool work with touch drawing

Carsten Hartenfels5ffc6a249251
diff --git a/libs/flake/tools/KoPathTool.cpp b/libs/flake/tools/KoPathTool.cpp
index 57a8b07804..1e906cceb0 100644
--- a/libs/flake/tools/KoPathTool.cpp
+++ b/libs/flake/tools/KoPathTool.cpp
@@ -544,6 +544,13 @@ void KoPathTool::repaintDecorations()
void KoPathTool::mousePressEvent(KoPointerEvent *event)
{
+ // When using touch drawing, we only ever receive move events after the
+ // finger has pressed down. We have to issue an artificial move here so that
+ // the tool's state is updated properly to handle the press.
+ if (event->isTouchEvent()) {
+ mouseMoveEvent(event);
+ }
+
// we are moving if we hit a point and use the left mouse button
if (m_activeHandle) {
m_currentStrategy.reset(m_activeHandle->handleMousePress(event));