┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-12-15 17:11:13 +0000
committerPeter Penz <[email protected]>2007-12-15 17:11:13 +0000
commitfb4907dc6d8f3e74d3f7f519b5bbb6af546912b5 (patch)
tree05d1f14bf9aec382437ade285e9c5d3fcbbbebd9 /src
parentceafa5cc22d0450e2a0d27023c62f0d339c3ca10 (diff)
Fixed "Eike Hein"-details-view-issue:
1. Open a Dolphin window 2. Switch to Details view 3. Navigate to a folder with a dozen or so items 4. Size the window so that there is an empty space below    the items 5. Move the mouse pointer below the items 6. Click and hold the mouse button, and move the pointer    upward to select all items in the list using the rect.    While selecting in this manner, move the pointer so    high that it is above the list headers in the toolbar.    Then, while still holding the mouse button and being    outside the listview's rect, move the pointer left out    of the window. Now with the pointer outside of the    window, move the pointer down into the area below the    list items, so that the selection rectangle no longer    intersects with the items. Notice they're still all    selected. CCMAIL: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=748830
Diffstat (limited to 'src')
-rw-r--r--src/dolphindetailsview.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp
index d90527767..bd2a75f61 100644
--- a/src/dolphindetailsview.cpp
+++ b/src/dolphindetailsview.cpp
@@ -207,10 +207,13 @@ void DolphinDetailsView::mouseMoveEvent(QMouseEvent* event)
// case QTreeView does no selection at all, which is not the wanted behavior
// in Dolphin -> select all items within the elastic band rectangle
clearSelection();
- if (mousePos.x() < header()->sectionSize(DolphinModel::Name)) {
- setSelection(QRect(m_elasticBandOrigin, m_elasticBandDestination),
- QItemSelectionModel::Select);
- }
+
+ const int nameColumnWidth = header()->sectionSize(DolphinModel::Name);
+ QRect selRect = QRect(m_elasticBandOrigin, m_elasticBandDestination).normalized();
+ const QRect nameColumnsRect(0, 0, nameColumnWidth, viewport()->height());
+ selRect = nameColumnsRect.intersected(selRect);
+
+ setSelection(selRect, QItemSelectionModel::Select);
}
QTreeView::mouseMoveEvent(event);