diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml index 8d699308478..53fae29a533 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml @@ -42,6 +42,8 @@ Item { // make sure categories with matches are expanded materialsView.expandVisibleSections() + texturesView.expandVisibleSections() + environmentsView.expandVisibleSections() } } diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml index 6a17a98a9d3..6483ebdd6bd 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryMaterialsView.qml @@ -32,7 +32,7 @@ HelperWidgets.ScrollView { for (let i = 0; i < categoryRepeater.count; ++i) { let cat = categoryRepeater.itemAt(i) if (cat.visible && !cat.expanded) - cat.expanded = true + cat.expandSection() } } @@ -58,6 +58,10 @@ HelperWidgets.ScrollView { expandOnClick: false onToggleExpand: bundleCategoryExpanded = !bundleCategoryExpanded + function expandSection() { + bundleCategoryExpanded = true + } + Grid { width: root.width leftPadding: 5 diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexturesView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexturesView.qml index 6027d4b6904..dd6509b67ec 100644 --- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexturesView.qml +++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexturesView.qml @@ -33,7 +33,7 @@ HelperWidgets.ScrollView { for (let i = 0; i < categoryRepeater.count; ++i) { let cat = categoryRepeater.itemAt(i) if (cat.visible && !cat.expanded) - cat.expanded = true + cat.expandSection() } } Column { @@ -58,6 +58,10 @@ HelperWidgets.ScrollView { expandOnClick: false onToggleExpand: bundleCategoryExpanded = !bundleCategoryExpanded + function expandSection() { + bundleCategoryExpanded = true + } + Grid { width: root.width leftPadding: 5