@@ -17,6 +17,7 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19import Unity 0.2
19import Unity 0.2
20import "../Components"
21import "../Components"
@@ -188,23 +189,30 @@ Item {
188 width: parent.width
189 width: parent.width
189 style: DashContentTabBarStyle {}
190 style: DashContentTabBarStyle {}
191− model: dashContentList.model
192+ SortFilterProxyModel {
195+ model: dashContentList.model
197+ property int selectedIndex: -1
193− onSelectedIndexChanged: {
198+ onSelectedIndexChanged: {
194− if (dashContentList.currentIndex == -1 && tabBar.selectedIndex != -1) {
199+ if (dashContentList.currentIndex == -1 && tabBar.selectedIndex != -1) {
195− // TODO This together with the Timer below
200+ // TODO This together with the Timer below
196− // are a workaround for the first tab sometimes not showing the text.
201+ // are a workaround for the first tab sometimes not showing the text.
197− // But Tabs are going away in the future so not sure if makes
202+ // But Tabs are going away in the future so not sure if makes
198− // sense invetigating what's the problem at this stage
203+ // sense invetigating what's the problem at this stage
199− selectionModeTimer.restart();
204+ selectionModeTimer.restart();
206+ dashContentList.currentIndex = selectedIndex;
201− dashContentList.currentIndex = selectedIndex;
210+ model: tabBarModel.count > 0 ? tabBarModel : null
204 Connections {
212 Connections {
205 target: dashContentList
213 target: dashContentList
206 onCurrentIndexChanged: {
214 onCurrentIndexChanged: {
207− tabBar.selectedIndex = dashContentList.currentIndex
215+ tabBarModel.selectedIndex = dashContentList.currentIndex