QHeaderView - remove stupid if
authorThorbjørn Lund Martsum <tmartsum@gmail.com>
Thu, 15 Dec 2011 06:32:15 +0000 (07:32 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 15 Dec 2011 14:39:24 +0000 (15:39 +0100)
Not only is this extra if unnecesary - it is confusing.
oldSize is different from size.
(otherwise we would have returned less than 10 lines above)

Change-Id: Ie911414f679df2be7b5c8bc2670225d46e986b32
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
src/widgets/itemviews/qheaderview.cpp

index 76529fc..e35f9ba 100644 (file)
@@ -884,8 +884,7 @@ void QHeaderView::resizeSection(int logical, int size)
     if (stretchLastSection() && visual == d->lastVisibleVisualIndex())
         d->lastSectionSize = size;
 
-    if (size != oldSize)
-        d->createSectionSpan(visual, visual, size, d->headerSectionResizeMode(visual));
+    d->createSectionSpan(visual, visual, size, d->headerSectionResizeMode(visual));
 
     if (!updatesEnabled()) {
         emit sectionResized(logical, oldSize, size);