on xenial help sign in
Merge lp:~aacid/unity8/fix-new-scopes-tab-name-missing
df486fcAlbert Astals
qml/Dash/DashContent.qml+9−5
@@ -178,7 +178,11 @@ Item {
178 selectionMode: false
178 selectionMode: false
179 style: DashContentTabBarStyle {}
179 style: DashContentTabBarStyle {}
180
180
181+ // TODO This together with the __styleInstance onModelChanged below
182+ // are a workaround for the first tab sometimes not showing the text.
183+ // But Tabs are going away in the future so not sure if makes
184+ // sense invetigating what's the problem at this stage
181− model: dashContentList.model
185+ model: dashContentList.model.count > 0 ? dashContentList.model : null
182
186
183 onSelectedIndexChanged: {
187 onSelectedIndexChanged: {
184 dashContentList.currentIndex = selectedIndex;
188 dashContentList.currentIndex = selectedIndex;
@@ -192,10 +196,10 @@ Item {
192 }
196 }
193
197
194 Connections {
198 Connections {
195− target: model
199+ target: __styleInstance
196− onCountChanged: {
200+ onModelChanged: {
197− if (tabBar.selectedIndex < 0 && model.count > 0)
201+ tabBar.selectedIndex = -1;
198− tabBar.selectedIndex = 0;
202+ tabBar.selectedIndex = 0;
199 }
203 }
200 }
204 }
201
205