Mouse when moving picture out of imageview doesn't wraps like in KDE4. This is very useful. Reproducible: Always Steps to Reproduce: Move the image by mouse out of image view. Actual Results: Mouse doesn't wrap. Expected Results: Mouse wraps like in KDE4. Patch tested on Arch Linux, Qt 5.4.2: --- abstractimageview.cpp.orig 2015-06-03 16:00:49.241659454 +0200 +++ abstractimageview.cpp 2015-06-03 16:00:55.708326391 +0200 @@ -306,7 +306,6 @@ QPointF mousePos = event->pos(); QPointF newScrollPos = d->mScrollPos + d->mLastDragPos - mousePos; -#if 0 // commented out due to mouse pointer warping around, bug in Qt? // Wrap mouse pos qreal maxWidth = boundingRect().width(); qreal maxHeight = boundingRect().height(); @@ -315,22 +314,28 @@ // The mouse get placed 1 pixel before/after the margin to avoid getting // considered as needing to wrap the other way in next mouseMoveEvent // (because we don't check the move vector) + bool setCursorPos = false; const int margin = 5; if (mousePos.x() <= margin) { mousePos.setX(maxWidth - margin - 1); + setCursorPos = true; } else if (mousePos.x() >= maxWidth - margin) { mousePos.setX(margin + 1); + setCursorPos = true; } if (mousePos.y() <= margin) { mousePos.setY(maxHeight - margin - 1); + setCursorPos = true; } else if (mousePos.y() >= maxHeight - margin) { mousePos.setY(margin + 1); + setCursorPos = true; } - // Set mouse pos (Hackish translation to screen coords!) - QPointF screenDelta = event->screenPos() - event->pos(); - QCursor::setPos((mousePos + screenDelta).toPoint()); -#endif + if (setCursorPos) { + // Set mouse pos (Hackish translation to screen coords!) + QPointF screenDelta = event->screenPos() - event->pos(); + QCursor::setPos((mousePos + screenDelta).toPoint()); + } d->mLastDragPos = mousePos; d->setScrollPos(newScrollPos);
Created attachment 92975 [details] Patch for infinite moving picture (Qt5 bug workaround) Patch tested on Arch Linux, Qt 5.4.2
Thanks for the patch! Unfortunately, as you have surely noticed, it has been ignored for 2 years. :( Patches in bugzilla tickets tend to get lost, so I encourage you to upload it to http://phabricator.kde.org/, which is the KDE patch submission infrastructure (among other things).
If you're still interested in submitting this patch, please see https://invent.kde.org/graphics/gwenview/-/merge_requests, thanks.
I tried applying this patch, but it seems like the feature in question no longer makes sense as you can't drag the image in the image view to switch images anymore. Furthermore, doing this breaks dragging the image out of the image view and into another app. So I don't think we'll be doing this, sorry. :)