]> cloud.milkyroute.net Git - dolphin.git/commitdiff
selection: fix rubberband vertices
authorMarco Savelli <svlmrc@gmail.com>
Mon, 18 Sep 2023 21:20:39 +0000 (23:20 +0200)
committerMéven Car <meven.car@kdemail.net>
Sat, 23 Sep 2023 08:36:53 +0000 (08:36 +0000)
src/kitemviews/kitemlistcontroller.cpp

index d70028d23d32e5f7a929f72f6f372bb1a9d027b7..be7a63e0993b43b16e0b5e8564fdb568999034d7 100644 (file)
@@ -654,11 +654,6 @@ bool KItemListController::mouseMoveEvent(QGraphicsSceneMouseEvent *event, const
 
             if (m_view->scrollOrientation() == Qt::Vertical) {
                 endPos.ry() += m_view->scrollOffset();
-                if (m_view->itemSize().width() < 0) {
-                    // Use a special rubberband for views that have only one column and
-                    // expand the rubberband to use the whole width of the view.
-                    endPos.setX(m_view->size().width());
-                }
             } else {
                 endPos.rx() += m_view->scrollOffset();
             }
@@ -1809,11 +1804,6 @@ void KItemListController::startRubberBand()
         QPoint startPos = m_view->transform().map(m_view->scene()->views().first()->mapFromGlobal(m_pressedMouseGlobalPos.toPoint()));
         if (m_view->scrollOrientation() == Qt::Vertical) {
             startPos.ry() += m_view->scrollOffset();
-            if (m_view->itemSize().width() < 0) {
-                // Use a special rubberband for views that have only one column and
-                // expand the rubberband to use the whole width of the view.
-                startPos.setX(0);
-            }
         } else {
             startPos.rx() += m_view->scrollOffset();
         }