[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/libkonq
From:       Martin Koller <m.koller () surfeu ! at>
Date:       2004-12-28 23:18:30
Message-ID: 20041228231830.DD5A41BBD7 () office ! kde ! org
[Download RAW message or body]

CVS commit by mkoller: 

First part to fix #91575
setMaxItemWidth() _before_ actually moving objects, otherwise the
calculation for the new position would be based on wrong item rects


  M +10 -5     konq_iconviewwidget.cc   1.309


--- kdebase/libkonq/konq_iconviewwidget.cc  #1.308:1.309
@@ -1517,4 +1517,13 @@ void KonqIconViewWidget::lineupIcons()
     int x0, y0, dx, dy, nx, ny;
     gridValues( &x0, &y0, &dx, &dy, &nx, &ny );
+
+    int itemWidth = dx - spacing();
+    bool newItemWidth = false;
+    if ( maxItemWidth() != itemWidth ) {
+        newItemWidth = true;
+        setMaxItemWidth( itemWidth );
+        setFont( font() );  // Force calcRect()
+    }
+
     typedef QValueList<QIconViewItem*> Bin;
     Bin*** bins = new Bin**[nx];
@@ -1682,10 +1691,6 @@ void KonqIconViewWidget::lineupIcons()
 
     // repaint
-    int itemWidth = dx - spacing();
-    if ( maxItemWidth() != itemWidth ) {
-        setMaxItemWidth( itemWidth );
-        setFont( font() );  // Force calcRect()
+    if ( newItemWidth )
         updateContents();
-    }
     else {
         // Repaint only repaintRegion...


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic