]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix pending zooming animation
authorPeter Penz <peter.penz19@gmail.com>
Thu, 2 Feb 2012 08:37:25 +0000 (09:37 +0100)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 2 Feb 2012 08:39:28 +0000 (09:39 +0100)
If doLayout() is invoked with the 'NoAnimation' hint, it must be assured
that any ongoing animations are stopped.

src/kitemviews/kitemlistview.cpp

index 8aa984e4bb106bbcd0b933c88b9d9498e789a5e6..d090184746d0a2af4ebe68f632a5c8f6e3c4b24a 100644 (file)
@@ -1353,12 +1353,6 @@ void KItemListView::doLayout(LayoutAnimationHint hint, int changedIndex, int cha
                 }
                 applyNewPos = false;
             }
                 }
                 applyNewPos = false;
             }
-        } else if (m_animation->isStarted(widget, KItemListViewAnimation::MovingAnimation)) {
-            if (animate) {
-                applyNewPos = false;
-            } else {
-                m_animation->stop(widget);
-            }
         }
 
         if (animate) {
         }
 
         if (animate) {
@@ -1386,6 +1380,8 @@ void KItemListView::doLayout(LayoutAnimationHint hint, int changedIndex, int cha
                 // The size of the view might have been changed. Animate the moving of the position.
                 applyNewPos = !moveWidget(widget, itemBounds);
             }
                 // The size of the view might have been changed. Animate the moving of the position.
                 applyNewPos = !moveWidget(widget, itemBounds);
             }
+        } else {
+            m_animation->stop(widget);
         }
 
         if (applyNewPos) {
         }
 
         if (applyNewPos) {