From eb4de378ea308e2c2675fe485c1791c90486038c Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sat, 3 Dec 2016 15:33:43 -0800 Subject: [PATCH] Hide view before settings source This prevent the visibility change from trashing source setting --- src/ui/MainWindowInner.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ui/MainWindowInner.qml b/src/ui/MainWindowInner.qml index 1943f30..4224c88 100644 --- a/src/ui/MainWindowInner.qml +++ b/src/ui/MainWindowInner.qml @@ -66,12 +66,13 @@ Item { } //-- In settings view, the full height is available. Set to 0 so it is ignored. ScreenTools.availableHeight = 0 + hideAllViews() if (settingsViewLoader.source != _settingsViewSource) { settingsViewLoader.source = _settingsViewSource } - hideAllViews() settingsViewLoader.visible = true toolBar.checkSettingsButton() + console.log("showSettingsView") } function showSetupView() { @@ -80,10 +81,10 @@ Item { } //-- In setup view, the full height is available. Set to 0 so it is ignored. ScreenTools.availableHeight = 0 + hideAllViews() if (setupViewLoader.source != _setupViewSource) { setupViewLoader.source = _setupViewSource } - hideAllViews() setupViewLoader.visible = true toolBar.checkSetupButton() } @@ -284,13 +285,13 @@ Item { anchors.top: toolBar.bottom anchors.bottom: parent.bottom visible: false - +/* onVisibleChanged: { if (!visible) { // Free up the memory for this when not shown. No need to persist. source = "" } - } + }*/ } Loader {