on xenial help sign in
[Hopefully] Fix infinite loop in some of the GSV tests

Potentially this could happen in real life too Given rounding issues sometimes we ended up in a loop of showing the floatingSeeLess, this makes the ScopeListView shorter which ends up in recalculation of whether floatingSeeLess should be visible which then meant no and loop forever. With this change i've run the test for 24 hours without it being stuck when previously it got stuck each 2 hours aprox (LP: #1599301) Approved by: Michał Sawicz

commit440f1c673910720d260fe3db1f3fccc430a666ef authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 16 Nov 2016, 10:44 (10 years ago) parent64803602ce7857
1 file changed+1−1
qml/Dash/GenericScopeView.qml+1−1
qml/Dash/GenericScopeView.qml+1−1
@@ -700,7 +700,7 @@ FocusScope {
700700
701701 function updateVisibility() {
702702 var companionPos = companionTo.mapToItem(floatingSeeLess, 0, 0);
703− showBecausePosition = companionPos.y > 0;
703+ showBecausePosition = Math.round(companionPos.y) > 0;
704704
705705 var posToBase = floatingSeeLess.mapToItem(companionBase, 0, -yOffset).y;
706706 yOffset = Math.max(0, companionBase.item.collapsedHeight - posToBase);