@@ -105,11 +105,13 @@ Item {
105105
106106 // If the number of items is less than the current index, then need to reset to another item.
107107 onCountChanged: {
108− if (count > 0 && currentIndex >= count) {
109− dashContent.setCurrentScopeAtIndex(count-1, true, true)
110− } else if (count > 0 && currentIndex < 0) {
111− // setting currentIndex directly, cause we don't want to loose set_current_index
112− dashContent.currentIndex = 0
108+ if (count > 0) {
109+ if (currentIndex >= count) {
110+ dashContent.setCurrentScopeAtIndex(count-1, true, true)
111+ } else if (currentIndex < 0) {
112+ // setting currentIndex directly, cause we don't want to loose set_current_index
113+ dashContent.currentIndex = 0
114+ }
113115 }
114116 }
115117