@@ -17,6 +17,7 @@
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919import Unity 0.1
20+import Utils 0.1
2021import "../Components"
2122
2223Item {
@@ -162,24 +163,31 @@ Item {
162163 selectionMode: false
163164 style: DashContentTabBarStyle {}
164165
165− model: dashContentList.model
166+ SortFilterProxyModel {
167+ id: tabBarModel
166168
167− onSelectedIndexChanged: {
168− dashContentList.currentIndex = selectedIndex;
169+ model: dashContentList.model
170+
171+ property int selectedIndex: -1
172+ onSelectedIndexChanged: {
173+ dashContentList.currentIndex = selectedIndex;
174+ }
169175 }
170176
177+ model: tabBarModel.count > 0 ? tabBarModel : null
178+
171179 Connections {
172180 target: dashContentList
173181 onCurrentIndexChanged: {
174− tabBar.selectedIndex = dashContentList.currentIndex
182+ tabBarModel.selectedIndex = dashContentList.currentIndex
175183 }
176184 }
177185
178186 Connections {
179187 target: model
180188 onCountChanged: {
181− if (tabBar.selectedIndex < 0 && model.count > 0)
182− tabBar.selectedIndex = 0;
189+ if (tabBarModel.selectedIndex < 0 && tabBarModel.count > 0)
190+ tabBarModel.selectedIndex = 0;
183191 }
184192 }
185193