From dbba1c411035a837725894729eb89f7a390b9e3f Mon Sep 17 00:00:00 2001 From: Joey de l'Arago Date: Wed, 2 Nov 2022 15:14:33 +0100 Subject: [PATCH] patch checking for base parent component of Combobox to check if it exists first. This should be refactored out some time. CURA-9424 --- resources/qml/Widgets/ComboBox.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml index eac85bfb44..a7eeb33f6a 100644 --- a/resources/qml/Widgets/ComboBox.qml +++ b/resources/qml/Widgets/ComboBox.qml @@ -18,6 +18,7 @@ ComboBox property var defaultTextOnEmptyModel: catalog.i18nc("@label", "No items to select from") // Text displayed in the combobox when the model is empty property var defaultTextOnEmptyIndex: "" // Text displayed in the combobox when the model has items but no item is selected property alias textFormat: contentLabel.textFormat + property alias backgroundColor: background.color enabled: delegateModel.count > 0 @@ -45,7 +46,7 @@ ComboBox State { name: "highlighted" - when: (base.hovered || control.hovered) && !control.activeFocus + when: ((base != undefined && base.hovered) || control.hovered) && !control.activeFocus PropertyChanges { target: background @@ -56,6 +57,7 @@ ComboBox background: UM.UnderlineBackground { + id: background // Rectangle for highlighting when this combobox needs to pulse. Rectangle {