From f7ca8cbf6893af9b15e064aee1cc5edb908a6273 Mon Sep 17 00:00:00 2001 From: Ruben D Date: Wed, 2 May 2018 14:27:30 +0200 Subject: [PATCH] Fix binding loop with height of tiles The lining at the bottom of a tile was anchored to the bottom but part of the tile and part of its childrenRect. This caused a binding loop because the childrenRect is dependent on the positioning of this lining (and its height) and the positioning of the lining was dependent on the height of the tile. Contributes to issue CURA-5035. --- plugins/Toolbox/resources/qml/ToolboxDetailTile.qml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index d992f4875b..6bad12236b 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -11,10 +11,7 @@ Item id: tile property bool installed: toolbox.isInstalled(model.id) width: detailList.width - UM.Theme.getSize("wide_margin").width - // TODO: Without this line, every instance of this object has 0 height. With - // it, QML spits out tons of bugs claiming a binding loop (not true). Why? - // Because QT is garbage. - height: Math.max( UM.Theme.getSize("toolbox_detail_tile").height, childrenRect.height + UM.Theme.getSize("default_margin").height) + height: Math.max(UM.Theme.getSize("toolbox_detail_tile").height, childrenRect.height + UM.Theme.getSize("default_margin").height) Item { id: normalData @@ -238,7 +235,8 @@ Item color: UM.Theme.getColor("lining") width: tile.width height: UM.Theme.getSize("default_lining").height - anchors.bottom: tile.bottom + anchors.top: supportedConfigsChart.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + UM.Theme.getSize("wide_margin").height //Normal margin for spacing after chart, wide margin between items. } Connections {