Commit 0c87abc2 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

[weather] Fix Notices view disappearing after first view

parent 4347ad7a
......@@ -58,6 +58,8 @@ Item {
visible: detailsView.model.length > 0
PlasmaComponents.TabButton {
id: fiveDaysTabButton
text: plasmoid.nativeInterface.panelModel.totalDays
tab: fiveDaysView
}
......@@ -66,9 +68,18 @@ Item {
tab: detailsView
}
PlasmaComponents.TabButton {
id: noticesTabButton
text: i18n("Notices")
visible: noticesView.visible
visible: noticesView.hasContent
tab: noticesView
onVisibleChanged: {
// PlasmaComponents.TabBar does not handle this, so let's do it ourselves
if (!visible && (tabBar.currentTab == noticesTabButton)) {
tabBar.currentTab = fiveDaysTabButton;
mainTabGroup.currentTab = fiveDaysTabButton.tab;
}
}
}
}
......
......@@ -21,9 +21,9 @@ Column {
id: root
property var model
readonly property bool hasContent: model && model.length > 0 && model[0].length > 0 && model[1].length > 0
spacing: units.largeSpacing
visible: model.length > 0 && model[0].length > 0 && model[1].length > 0
Notice {
title: i18nc("weather warnings", "Warnings Issued:")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment