From 9a73a1da0fd6affe239be0f873f18859407301b0 Mon Sep 17 00:00:00 2001 From: Aleksei German Date: Mon, 2 Nov 2020 17:20:01 +0100 Subject: [PATCH] QmlDesigner: Fix for PropertyEditor in MCU project - Fixed bug with childless items properties Change-Id: I660dc8d82d693c7e1b3f0e94fa040d61675df6f8 Reviewed-by: Thomas Hartmann --- .../components/propertyeditor/propertyeditorvalue.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp index dd507df5ea7..106b68562dc 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp @@ -300,8 +300,10 @@ bool PropertyEditorValue::isAvailable() const if (QmlDesigner::QmlItemNode::isValidQmlItemNode(m_modelNode)) { const bool itemHasChildren = QmlDesigner::QmlItemNode(m_modelNode).hasChildren(); - if (allowedItemProps.allowChildren == itemHasChildren) - return true; + if (itemHasChildren) + return allowedItemProps.allowChildren + + return true; } } }