From def780c672af2b90e8face3720e1567432b32b8d Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 2 Feb 2012 09:37:25 +0100 Subject: [PATCH] Fix pending zooming animation If doLayout() is invoked with the 'NoAnimation' hint, it must be assured that any ongoing animations are stopped. --- src/kitemviews/kitemlistview.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 8aa984e4b..d09018474 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -1353,12 +1353,6 @@ void KItemListView::doLayout(LayoutAnimationHint hint, int changedIndex, int cha } applyNewPos = false; } - } else if (m_animation->isStarted(widget, KItemListViewAnimation::MovingAnimation)) { - if (animate) { - applyNewPos = false; - } else { - m_animation->stop(widget); - } } 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); } + } else { + m_animation->stop(widget); } if (applyNewPos) { -- 2.47.3