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++
SAP: Clean up button clicking a little
Carsten Hartenfels8386cb3d24e2
diff --git a/libs/ui/kis_selection_actions_panel_button.cpp b/libs/ui/kis_selection_actions_panel_button.cppindex bbcd700170..c39b70ea0f 100644--- a/libs/ui/kis_selection_actions_panel_button.cpp+++ b/libs/ui/kis_selection_actions_panel_button.cpp@@ -90,19 +90,17 @@ bool KisSelectionActionsPanelButton::event(QEvent *e){//Manually handle the button being pressed on touchif (e->type() == QEvent::TouchBegin) {+ QTouchEvent *touchEvent = static_cast<QTouchEvent *>(e);#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)- if (((QTouchEvent *)e)->points().count() == 1) {- this->animateClick();- e->accept();- return true;- }+ int pointsCount = touchEvent->points().count();#else- if (((QTouchEvent *)e)->touchPoints().count() == 1) {+ int pointsCount = touchEvent->touchPoints().count();+#endif+ if (pointsCount == 1) {this->animateClick();e->accept();return true;}-#endif}return QAbstractButton::event(e);}