From 65e87625466d50a8c7dd4f3234b899e8028abdde Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 5 Jan 2018 11:53:38 +0100 Subject: [PATCH] Fix layer height slider update issue CURA-4758 --- resources/qml/SidebarSimple.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 7aca25160a..74c2bf1ec1 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -70,6 +70,18 @@ Item onActiveVariantChanged: qualityModel.update() } + Connections { + target: base + onVisibleChanged: + { + // update needs to be called when the widgets are visible, otherwise the step width calculation + // will fail because the width of an invisible item is 0. + if (visible) { + qualityModel.update(); + } + } + } + ListModel { id: qualityModel