diff options
author | Niels Weber <niels.weber@digia.com> | 2014-09-25 13:53:03 +0200 |
---|---|---|
committer | Caroline Chao <caroline.chao@digia.com> | 2014-09-25 13:57:09 +0200 |
commit | eb4151c98d5a2cb2eb511fe813fd03098d1f3029 (patch) | |
tree | 2bfb509c6093da476268ed048fb4ac8239b28e30 /qml | |
parent | daff804eede8eafd043e6ae5ceac0cd8ffe4849a (diff) |
Fix bug when only one talk in a track
Change-Id: Ib615fba0fee6a03d44c59366f2966e39ad421e27
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Diffstat (limited to 'qml')
-rw-r--r-- | qml/components/TrackSwitcher.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qml/components/TrackSwitcher.qml b/qml/components/TrackSwitcher.qml index 5a5c3bf..0dd6fc9 100644 --- a/qml/components/TrackSwitcher.qml +++ b/qml/components/TrackSwitcher.qml @@ -128,7 +128,7 @@ Rectangle { // Count here what is the first hour and last hour that needs to be shown in time listView // for example 10.00 11.00 12.00 ... or 08.00 09.00 10.00 - var modelCountAfterStart = model.rowCount() - 1; + var modelCountAfterStart = Math.max(model.rowCount() - 1, 1); var halfModelCount = Math.floor(modelCountAfterStart / 2) var needOneMoreItem = halfModelCount * 2 !== modelCountAfterStart for (var i = 1; i < halfModelCount; i++) { |