From c80cd9679ff8ad6680d7f6387aa0072ec37527d2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 29 Aug 2019 15:15:35 +0200 Subject: [PATCH] Fix RadioCheckbars layout getting out of wack sometimes CURA-6598 --- .../Recommended/RecommendedQualityProfileSelector.qml | 7 ++++++- resources/qml/RadioCheckbar.qml | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml index 9194f3c85c..2742605399 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml @@ -78,7 +78,7 @@ Item left: parent.left right: parent.right } - height: childrenRect.height + height: intentCategoryLabel.height Label { @@ -110,6 +110,11 @@ Item // When user created profile is active, no quality tickbox should be active. return false } + + if(modelItem === null) + { + return false + } return Cura.MachineManager.activeQualityType == modelItem.quality_type && Cura.MachineManager.activeIntentCategory == modelItem.intent_category } diff --git a/resources/qml/RadioCheckbar.qml b/resources/qml/RadioCheckbar.qml index 1bc1c135f6..4f959fc8fd 100644 --- a/resources/qml/RadioCheckbar.qml +++ b/resources/qml/RadioCheckbar.qml @@ -57,10 +57,11 @@ Item Item { Layout.fillWidth: true + Layout.fillHeight: true // The last item of the repeater needs to be shorter, as we don't need another part to fit // the horizontal bar. The others should essentially not be limited. Layout.maximumWidth: index + 1 === repeater.count ? activeComponent.width: 200000000 - height: activeComponent.height + property bool isEnabled: model.available // The horizontal bar between the checkable options. // Note that the horizontal bar points towards the previous item.