Skip to content

Commit

Permalink
Don't scroll block list needlessly, fixes #84
Browse files Browse the repository at this point in the history
  • Loading branch information
sampla committed Jun 13, 2017
1 parent 6e82ce5 commit d71af0f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions BlocksList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit d71af0f

Please sign in to comment.