]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'release/22.04'
authorFelix Ernst <fe.a.ernst@gmail.com>
Sun, 1 May 2022 10:10:02 +0000 (12:10 +0200)
committerFelix Ernst <fe.a.ernst@gmail.com>
Sun, 1 May 2022 10:10:02 +0000 (12:10 +0200)
src/kitemviews/kitemlistview.cpp

index 77114735bada9a536beb366f736d41b2798d33fe..562a45e1877a2e22be67d09b295b0862b4abd495 100644 (file)
@@ -1858,6 +1858,8 @@ void KItemListView::doLayout(LayoutAnimationHint hint, int changedIndex, int cha
         Q_ASSERT(widget->index() == i);
         widget->setVisible(true);
 
+        bool animateIconResizing = animate;
+
         if (widget->size() != itemBounds.size()) {
             // Resize the widget for the item to the changed size.
             if (animate) {
@@ -1874,11 +1876,13 @@ void KItemListView::doLayout(LayoutAnimationHint hint, int changedIndex, int cha
             } else {
                 widget->resize(itemBounds.size());
             }
+        } else {
+            animateIconResizing = false;
         }
 
         const int newIconSize = widget->styleOption().iconSize;
         if (widget->iconSize() != newIconSize) {
-            if (animate) {
+            if (animateIconResizing) {
                 m_animation->start(widget, KItemListViewAnimation::IconResizeAnimation, newIconSize);
             } else {
                 widget->setIconSize(newIconSize);