diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/EffectsSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/EffectsSection.qml index c566e2fd971..25d21a751a6 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/EffectsSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/EffectsSection.qml @@ -186,8 +186,6 @@ Section { spacing: 1 Section { - readonly property bool __isInEffectsSection: true // used by property search logic - sectionHeight: 37 anchors.left: parent.left anchors.right: parent.right @@ -235,8 +233,6 @@ Section { } Section { - readonly property bool __isInEffectsSection: true // used by property search logic - sectionHeight: 37 anchors.left: parent.left anchors.right: parent.right @@ -311,8 +307,6 @@ Section { Section { id: delegate - readonly property bool __isInEffectsSection: true // used by property search logic - property QtObject wrapper: modelNodeBackend.registerSubSelectionWrapper(modelData) property bool wasExpanded: false diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertySearchBar.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertySearchBar.qml index 5a71bd8c851..2df62286e50 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertySearchBar.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertySearchBar.qml @@ -63,7 +63,7 @@ Rectangle { internal.clear(); const searchText = searchBox.text.toLowerCase(); if (searchText.length > 0) { - internal.traverse(root.contentItem, searchText); + internal.traverse(root.contentItem, searchText, false); internal.searched = true; } } @@ -98,7 +98,7 @@ Rectangle { }); } - function traverse(item, searchText) { + function traverse(item, searchText, isInSection) { let hideSection = true; let hideParentSection = true; item.children.forEach((child, index, arr) => { @@ -135,13 +135,14 @@ Rectangle { } } } - hideSection &= internal.traverse(child, searchText); + hideSection &= internal.traverse(child, searchText, + isInSection || child instanceof HelperWidgets.Section); if (child instanceof HelperWidgets.Section) { const action = hideSection ? internal.enableSearchHideAction : internal.expandSectionAction; action(child); - if (child.__isInEffectsSection && !hideSection) + if (isInSection && !hideSection) hideParentSection = false; hideSection = true;