iconSize() == 0

Maks Orlovich mo002j at mail.rochester.edu
Sun Jun 8 17:42:22 BST 2003


> 0 means "whatever is the configuration for KIcon::Desktop icons".
> The equality check above should probably take that into account indeed...

I see, thanks. Does something like this look OK?


--- konq_iconview.cc    30 May 2003 15:45:07 -0000      1.433
+++ konq_iconview.cc    8 Jun 2003 16:39:56 -0000
@@ -605,7 +604,17 @@ void KonqKfmIconView::slotSortDirsFirst(

 void KonqKfmIconView::newIconSize( int size )
 {
-    if ( size == m_pIconView->iconSize() )
+    //Either of the sizes can be 0 to indicate the default (Desktop) size
icons.
+    //check for that when checking whether the size changed
+    int effSize = size;
+    if (effSize == 0)
+       effSize = IconSize(KIcon::Desktop);
+
+    int oldEffSize = m_pIconView->iconSize();
+    if (oldEffSize == 0)
+       oldEffSize = IconSize(KIcon::Desktop);
+
+    if ( effSize == oldEffSize )
         return;

     KonqDirPart::newIconSize( size );





More information about the kfm-devel mailing list