diff options
author | Sebastian Kügler <sebas@kde.org> | 2016-01-13 03:01:46 +0100 |
---|---|---|
committer | Sebastian Kügler <sebas@kde.org> | 2016-01-13 03:08:34 +0100 |
commit | 8199c13f42a9469a8293803ec888654f3a0f1e33 (patch) | |
tree | 3d4a47bb600eee06ac57a6eeae06c999211504cc /qt-mobile | |
parent | 7e9648c5cbdf3b7a4e84ddb925619d5a202460c5 (diff) | |
download | subsurface-8199c13f42a9469a8293803ec888654f3a0f1e33.tar.gz |
fix misrendered profiles when fast-flicking
- 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 <sebas@kde.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/qml/DiveList.qml | 15 |
1 files changed, 6 insertions, 9 deletions
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 { |