From 997f19ba265f2d57a9f535ffddd333a047b77568 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 22 Nov 2019 11:02:19 +0100 Subject: [PATCH] Prevent flicking behavior for machine selection Contributes to #6684 --- resources/qml/WelcomePages/AddLocalPrinterScrollView.qml | 3 ++- resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml b/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml index e4a7a98308..fce616472f 100644 --- a/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml +++ b/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml @@ -91,7 +91,8 @@ Item // individual item has a dynamic change on its visibility, the ListView doesn't redraw itself. // The default value of cacheBuffer is platform-dependent, so we explicitly disable it here. cacheBuffer: 0 - + boundsBehavior: Flickable.StopAtBounds + flickDeceleration: 20000 // To prevent the flicking behavior. model: UM.DefinitionContainersModel { id: machineDefinitionsModel diff --git a/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml b/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml index 95eff0465a..5a4f5ec7b7 100644 --- a/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml +++ b/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml @@ -71,7 +71,8 @@ Item section.property: "modelData.sectionName" section.criteria: ViewSection.FullString section.delegate: sectionHeading - + boundsBehavior: Flickable.StopAtBounds + flickDeceleration: 20000 // To prevent the flicking behavior. cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item. Component.onCompleted: