src/gui/itemviews/qtableview.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
child 7 3f74d0d4af4c
--- a/src/gui/itemviews/qtableview.cpp	Fri Feb 19 23:40:16 2010 +0200
+++ b/src/gui/itemviews/qtableview.cpp	Fri Mar 12 15:46:37 2010 +0200
@@ -114,7 +114,9 @@
         }
     } else if (old_height > span->height()) {
         //remove the span from all the subspans lists that intersect the columns not covered anymore
-        Index::iterator it_y = index.lowerBound(qMin(-span->bottom(), 0));
+        Index::iterator it_y = index.lowerBound(-span->bottom());
+        if (it_y == index.end())
+            it_y = index.find(-span->top());    // This is the only span remaining and we are deleting it.
         Q_ASSERT(it_y != index.end()); //it_y must exist since the span is in the list
         while (-it_y.key() <= span->top() + old_height -1) {
             if (-it_y.key() > span->bottom()) {