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

commit2ce785709d421a8ee9d95d1e1f514abdb1372355 authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 16 Nov 2016, 09:36 (10 years ago) parent3893655
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);