From: Frank Reininghaus Date: Sun, 11 Oct 2009 19:02:55 +0000 (+0000) Subject: Make sure that the faked mouse event in X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/1c9b9347444a02e98c711ae9ed0638371fad3c6e Make sure that the faked mouse event in DolphinViewAutoScroller::scrollViewport() gets the right keyboard modifiers. This fixes the problem that the previous selection is lost when several Ctrl-rubber band selections are made and the view scrolls or the mouse pointer gets close to the edge of the viewport. BUG: 190703 svn path=/trunk/KDE/kdebase/apps/; revision=1034012 --- diff --git a/src/dolphinviewautoscroller.cpp b/src/dolphinviewautoscroller.cpp index cfd3543a5..e0ed342dd 100644 --- a/src/dolphinviewautoscroller.cpp +++ b/src/dolphinviewautoscroller.cpp @@ -20,7 +20,7 @@ #include "dolphinviewautoscroller.h" #include -#include +#include #include #include #include @@ -143,7 +143,7 @@ void DolphinViewAutoScroller::scrollViewport() // update the rubberband. QWidget* viewport = m_itemView->viewport(); const QPoint pos = viewport->mapFromGlobal(QCursor::pos()); - QMouseEvent event(QEvent::MouseMove, pos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); + QMouseEvent event(QEvent::MouseMove, pos, Qt::LeftButton, Qt::LeftButton, QApplication::keyboardModifiers()); QCoreApplication::sendEvent(viewport, &event); } }