From d71af0fadff4b37b81de6c93778d15c78159f676 Mon Sep 17 00:00:00 2001 From: Martin Voelkle Date: Tue, 13 Jun 2017 15:19:55 +0200 Subject: [PATCH] Don't scroll block list needlessly, fixes #84 --- BlocksList.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BlocksList.qml b/BlocksList.qml index 85650c67f..f5b35a203 100644 --- a/BlocksList.qml +++ b/BlocksList.qml @@ -52,9 +52,13 @@ ListView { if (blockList.contains(blockListPos)) { moved = true; if (blockList.isLandscape) { - blockList.contentY = startPos - blockListPos.y; + if (blockList.contentItem.height > blockList.height) { + blockList.contentY = startPos - blockListPos.y; + } } else { - blockList.contentX = startPos - blockListPos.x; + if (blockList.contentItem.width > blockList.width) { + blockList.contentX = startPos - blockListPos.x; + } } }