on xenial help sign in
More overshoot check fixes

* Only do the overshoot checks if we are moving * The "real" content height is not contentHeight but contentHeight - originY

commitb1d46d58dfc5b7f2eb091773e1979aa7af7c55e2 authorAlbert Astals <albert.astals@canonical.com> dateTue 8 Apr 2014, 15:49 (13 years ago) parentf64a686
1 file changed+9−6
qml/Dash/GenericScopeView.qml+9−6
qml/Dash/GenericScopeView.qml+9−6
@@ -237,12 +237,15 @@ FocusScope {
237237 }
238238
239239 function updateDelegateCreationRange() {
240− // Do not update the range if we are overshooting up or down, since we'll come back
241− // to the stable position and delete/create items without any reason
242− if (categoryView.contentY < categoryView.originY) {
243− return;
244− } else if (categoryView.contentHeight > categoryView.height && categoryView.contentY + categoryView.height > categoryView.contentHeight) {
245− return;
240+ if (moving) {
241+ // Do not update the range if we are overshooting up or down, since we'll come back
242+ // to the stable position and delete/create items without any reason
243+ if (categoryView.contentY < categoryView.originY) {
244+ return;
245+ } else if (categoryView.originY + categoryView.contentHeight > categoryView.height &&
246+ categoryView.contentY + categoryView.height > categoryView.contentHeight) {
247+ return;
248+ }
246249 }
247250
248251 if (item && item.hasOwnProperty("delegateCreationBegin")) {