From adcc2f28a565172434c6690c0bf90d94c2eb2202 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sun, 22 Mar 2020 16:21:26 +0300 Subject: [PATCH] Fixed vertical layout's item position when it doesn't require animation. --- ui/wrap/vertical_layout_reorder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/wrap/vertical_layout_reorder.cpp b/ui/wrap/vertical_layout_reorder.cpp index f880602..e312114 100644 --- a/ui/wrap/vertical_layout_reorder.cpp +++ b/ui/wrap/vertical_layout_reorder.cpp @@ -212,6 +212,10 @@ void VerticalLayoutReorder::finishCurrent() { } current.finalShift += sum; } + if (!(current.finalShift + current.deltaShift)) { + current.shift = 0; + _layout->setVerticalShift(index, 0); + } base::reorder(_entries, index, result); _layout->reorderRows(index, _currentDesiredIndex); for (auto i = 0, count = int(_entries.size()); i != count; ++i) {