]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
Interface fixes and tweaks for Phoenix
[wxWidgets.git] / src / generic / listctrl.cpp
index ddb6197f0799aba5648603484789f1da74010604..481654ecd854bf43afab5d1edeaa2dd9f01a063c 100644 (file)
@@ -3181,10 +3181,14 @@ void wxListMainWindow::SetItem( wxListItem &item )
         }
     }
 
         }
     }
 
-    // update the item on screen
-    wxRect rectItem;
-    GetItemRect(id, rectItem);
-    RefreshRect(rectItem);
+    // update the item on screen unless we're going to update everything soon
+    // anyhow
+    if ( !m_dirty )
+    {
+        wxRect rectItem;
+        GetItemRect(id, rectItem);
+        RefreshRect(rectItem);
+    }
 }
 
 void wxListMainWindow::SetItemStateAll(long state, long stateMask)
 }
 
 void wxListMainWindow::SetItemStateAll(long state, long stateMask)
@@ -3660,11 +3664,15 @@ void wxListMainWindow::RecalculatePositions(bool noRefresh)
                             || i == count - 1)
                     {
                         // Adjust all items in this row to have the same
                             || i == count - 1)
                     {
                         // Adjust all items in this row to have the same
-                        // width to ensure that they all align horizontally.
-                        size_t firstRowLine = i - currentlyVisibleLines + 1;
-                        for (size_t j = firstRowLine; j <= i; j++)
+                        // width to ensure that they all align horizontally in
+                        // icon view.
+                        if ( HasFlag(wxLC_ICON) || HasFlag(wxLC_SMALL_ICON) )
                         {
                         {
-                            GetLine(j)->m_gi->ExtendWidth(maxWidthInThisRow);
+                            size_t firstRowLine = i - currentlyVisibleLines + 1;
+                            for (size_t j = firstRowLine; j <= i; j++)
+                            {
+                                GetLine(j)->m_gi->ExtendWidth(maxWidthInThisRow);
+                            }
                         }
 
                         currentlyVisibleLines = 0;
                         }
 
                         currentlyVisibleLines = 0;