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++
Recover outoscrolling reature in KoToolProxy
Dmitry Kazakovccdbc4eefd14
diff --git a/libs/flake/KoToolProxy.cpp b/libs/flake/KoToolProxy.cppindex 31ddf01853..e0c47c06ff 100644--- a/libs/flake/KoToolProxy.cpp+++ b/libs/flake/KoToolProxy.cpp@@ -53,13 +53,22 @@ void KoToolProxyPrivate::timeout() // Auto scroll the canvasQRectF mouseArea(widgetScrollPointDoc, QSizeF(10, 10));mouseArea.setTopLeft(mouseArea.center());+ const QPointF oldPreferredCenter = controller->preferredCenter();+controller->ensureVisibleDoc(mouseArea, true);+ const QPointF newPreferredCenter = controller->preferredCenter();++ // if scrolling has happened, then just return!+ if (oldPreferredCenter == newPreferredCenter) {+ return;+ }+widgetScrollPointDoc = parent->widgetToDocument(originalWidgetPoint);QMouseEvent event(QEvent::MouseMove, originalWidgetPoint, Qt::LeftButton, Qt::LeftButton, QFlags<Qt::KeyboardModifier>());KoPointerEvent ev(&event, widgetScrollPointDoc);- //activeTool->mouseMoveEvent(&ev);+ activeTool->mouseMoveEvent(&ev);}void KoToolProxyPrivate::checkAutoScroll(const KoPointerEvent &event)