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++

Fix crash when trying to use stylus while touch is active

Dmitry Kazakovfb76632b8374
diff --git a/libs/ui/input/kis_shortcut_matcher.cpp b/libs/ui/input/kis_shortcut_matcher.cpp
index 5c5397f6b5..99f4d86685 100644
--- a/libs/ui/input/kis_shortcut_matcher.cpp
+++ b/libs/ui/input/kis_shortcut_matcher.cpp
@@ -65,12 +65,14 @@ QTouchEvent generateFakeTouchEndEvent(const QTouchEvent *event)
it = points.erase(it);
} else {
it->setState(Qt::TouchPointReleased);
+ ++it;
}
#else
if (it->state() == QEventPoint::Released) {
it = points.erase(it);
} else {
QMutableEventPoint::setState(*it, QEventPoint::Released);
+ ++it;
}
#endif
}