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

List:       kde-commits
Subject:    kdebase/kdesktop
From:       Martin Koller <m.koller () surfeu ! at>
Date:       2004-12-29 15:24:28
Message-ID: 20041229152428.C38871BC45 () office ! kde ! org
[Download RAW message or body]

CVS commit by mkoller: 

BUG: 91575
On the first load of the icon positions, don't check for overlapping icons and simply \
place them as they were saved. Also save the icon positions when an icon was moved


  M +7 -2      kdiconview.cc   1.143


--- kdebase/kdesktop/kdiconview.cc  #1.142:1.143
@@ -905,4 +905,6 @@ void KDIconView::slotClear()
 void KDIconView::slotNewItems( const KFileItemList & entries )
 {
+  bool firstRun = (count() == 0);  // no icons yet, this seems to be the initial \
loading +
   // delay updates until all new items have been created
   setUpdatesEnabled( false );
@@ -975,5 +977,5 @@ void KDIconView::slotNewItems( const KFi
         QRect oldPos = fileIVI->rect();
         fileIVI->move( x, y );
-        if ( !isFreePosition( fileIVI ) ) // if we can't put it there, then let \
QIconView decide +        if ( !firstRun && !isFreePosition( fileIVI ) ) // if we \
can't put it there, then let QIconView decide  {
             kdDebug(1214)<<"slotNewItems() pos was not free :-("<<endl;
@@ -1338,6 +1340,9 @@ void KDIconView::contentsDropEvent( QDro
         KonqIconViewWidget::contentsDropEvent( e );
     }
-    if (QIconDrag::canDecode(e))
+    if (QIconDrag::canDecode(e)) {
       emit iconMoved();
+      if ( !m_autoAlign )    // if autoAlign, positions were saved in lineupIcons
+        saveIconPositions();
+    }
 }
 


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

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