From b88616a67af25912b1614f6427117401638cb9fb Mon Sep 17 00:00:00 2001 From: davidsastresas Date: Sun, 14 Jan 2024 20:47:18 +0100 Subject: [PATCH] MainRootWindow.qml: PR CustomMainRootWindow: fix bug, empty loader visible as blank panel: when clicking back button screen from any tool, it would go blank and then it would collapse, because the loader was being emptied before the drawer containing it closed completely --- src/ui/MainRootWindow.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui/MainRootWindow.qml b/src/ui/MainRootWindow.qml index f3d5dd2..d4c8ce5 100644 --- a/src/ui/MainRootWindow.qml +++ b/src/ui/MainRootWindow.qml @@ -436,6 +436,11 @@ ApplicationWindow { property alias toolSource: toolDrawerLoader.source property alias toolIcon: toolIcon.source + // Unload the loader only after closed, otherwise we will see a "blank" loader in the meantime + onClosed: { + toolDrawer.toolSource = "" + } + Rectangle { id: toolDrawerToolbar anchors.left: parent.left @@ -492,7 +497,6 @@ ApplicationWindow { width: (backTextLabel.x + backTextLabel.width) - backIcon.x onClicked: { toolDrawer.visible = false - toolDrawer.toolSource = "" } } }