]> cloud.milkyroute.net Git - dolphin.git/commitdiff
If the elastic band ventures beyond the logical top-left of the view (NOTE: not the...
authorSimon Paul St James <kdedevel@etotheipiplusone.com>
Wed, 5 Nov 2008 21:54:05 +0000 (21:54 +0000)
committerSimon Paul St James <kdedevel@etotheipiplusone.com>
Wed, 5 Nov 2008 21:54:05 +0000 (21:54 +0000)
CCMAIL: peter.penz@gmx.at

svn path=/trunk/KDE/kdebase/apps/; revision=880585

src/dolphindetailsview.cpp

index 883f5a774b1ad8fdf9ca0d14f7d03ac797230052..3fa7ae196caf75d6e6bfb22502ac1497bf3c804e 100644 (file)
@@ -514,6 +514,13 @@ void DolphinDetailsView::updateElasticBand()
         QRect dirtyRegion(elasticBandRect());        
         const QPoint scrollPos(horizontalScrollBar()->value(), verticalScrollBar()->value());
         m_band.destination = viewport()->mapFromGlobal(QCursor::pos()) + scrollPos;
+        // Going above the (logical) top-left of the view causes complications during selection;
+        // we may as well prevent it.
+        if (m_band.destination.y() < 0)
+            m_band.destination.setY(0);
+        if (m_band.destination.x() < 0)
+            m_band.destination.setX(0);
+            
         dirtyRegion = dirtyRegion.united(elasticBandRect());
         setDirtyRegion(dirtyRegion);
     }