From 8199c13f42a9469a8293803ec888654f3a0f1e33 Mon Sep 17 00:00:00 2001 From: Sebastian Kügler Date: Wed, 13 Jan 2016 03:01:46 +0100 Subject: fix misrendered profiles when fast-flicking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Apparently, QMLProfile doesn't like being painted without being visible, when flicking quickly through the dives I would get empty rendered profiles. Setting the cachebuffer to zero fixes it, and saves some memory. It still has some unfortunate timing, the profile gets rendered mid-flick, which leads to a delay in the flicking motion, quite annoying. We will have to somehow make sure that new profiles are rendered after flicking, not during - Smallish cleanups Signed-off-by: Sebastian Kügler --- qt-mobile/qml/DiveList.qml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'qt-mobile') diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml index 07b437c99..9664c95a3 100644 --- a/qt-mobile/qml/DiveList.qml +++ b/qt-mobile/qml/DiveList.qml @@ -145,18 +145,11 @@ MobileComponents.Page { anchors.fill: parent model: diveModel currentIndex: -1 - Connections { - target: detailsWindow - onCurrentIndexChanged: diveListView.currentIndex = detailsWindow.currentIndex - } delegate: diveDelegate boundsBehavior: Flickable.StopAtBounds maximumFlickVelocity: parent.height * 5 - cacheBuffer: Math.max(5000, parent.height * 5) - //highlight: Rectangle { color: MobileComponents.Theme.highlightColor; width: MobileComponents.Units.smallSpacing } - focus: true - clip: true - section.property: "trip" + cacheBuffer: 0 // seems to avoid empty rendered profiles + section.property: "trip" // FIXME: "dive.trip" gives weird section labels. section.criteria: ViewSection.FullString section.delegate: tripHeading header: MobileComponents.Heading { @@ -168,6 +161,10 @@ MobileComponents.Page { opacity: 0.8 - startPage.opacity visible: opacity > 0 } + Connections { + target: detailsWindow + onCurrentIndexChanged: diveListView.currentIndex = detailsWindow.currentIndex + } } } StartPage { -- cgit v1.2.3-70-g09d2