diff options
| author | Frank Reininghaus <[email protected]> | 2011-08-14 19:35:06 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2011-08-14 19:35:06 +0200 |
| commit | c12f0f8c61d7ec269be689a42836fe4d67a96253 (patch) | |
| tree | 2d14088cfc0c17a234fa041c427c57313b34b383 | |
| parent | 2476f632de00829425f458462c3b16ea661dfe2f (diff) | |
Remove incorrect asserts
They could lead to crashes if the Details View is used and the
view is not wide enough to show all columns for the items.
| -rw-r--r-- | src/kitemviews/kitemlistview.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 81b46b1d2..a88116800 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -627,12 +627,14 @@ void KItemListView::slotCurrentChanged(int current, int previous) newOffset += currentBoundingRect.bottom() - viewGeometry.bottom(); } else if (currentBoundingRect.left() < viewGeometry.left()) { - Q_ASSERT(scrollOrientation() == Qt::Horizontal); - newOffset += currentBoundingRect.left() - viewGeometry.left(); + if (scrollOrientation() == Qt::Horizontal) { + newOffset += currentBoundingRect.left() - viewGeometry.left(); + } } else if ((currentBoundingRect.right() > viewGeometry.right())) { - Q_ASSERT(scrollOrientation() == Qt::Horizontal); - newOffset += currentBoundingRect.right() - viewGeometry.right(); + if (scrollOrientation() == Qt::Horizontal) { + newOffset += currentBoundingRect.right() - viewGeometry.right(); + } } emit scrollTo(newOffset); |
