Commit eb4de378 authored by Don Gagne's avatar Don Gagne

Hide view before settings source

This prevent the visibility change from trashing source setting
parent b25cde07
...@@ -66,12 +66,13 @@ Item { ...@@ -66,12 +66,13 @@ Item {
} }
//-- In settings view, the full height is available. Set to 0 so it is ignored. //-- In settings view, the full height is available. Set to 0 so it is ignored.
ScreenTools.availableHeight = 0 ScreenTools.availableHeight = 0
hideAllViews()
if (settingsViewLoader.source != _settingsViewSource) { if (settingsViewLoader.source != _settingsViewSource) {
settingsViewLoader.source = _settingsViewSource settingsViewLoader.source = _settingsViewSource
} }
hideAllViews()
settingsViewLoader.visible = true settingsViewLoader.visible = true
toolBar.checkSettingsButton() toolBar.checkSettingsButton()
console.log("showSettingsView")
} }
function showSetupView() { function showSetupView() {
...@@ -80,10 +81,10 @@ Item { ...@@ -80,10 +81,10 @@ Item {
} }
//-- In setup view, the full height is available. Set to 0 so it is ignored. //-- In setup view, the full height is available. Set to 0 so it is ignored.
ScreenTools.availableHeight = 0 ScreenTools.availableHeight = 0
hideAllViews()
if (setupViewLoader.source != _setupViewSource) { if (setupViewLoader.source != _setupViewSource) {
setupViewLoader.source = _setupViewSource setupViewLoader.source = _setupViewSource
} }
hideAllViews()
setupViewLoader.visible = true setupViewLoader.visible = true
toolBar.checkSetupButton() toolBar.checkSetupButton()
} }
...@@ -284,13 +285,13 @@ Item { ...@@ -284,13 +285,13 @@ Item {
anchors.top: toolBar.bottom anchors.top: toolBar.bottom
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: false visible: false
/*
onVisibleChanged: { onVisibleChanged: {
if (!visible) { if (!visible) {
// Free up the memory for this when not shown. No need to persist. // Free up the memory for this when not shown. No need to persist.
source = "" source = ""
} }
} }*/
} }
Loader { Loader {
......
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