diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2022-11-29 16:29:31 +0200 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2022-11-29 14:55:31 +0000 |
commit | b5befc694514d1b223b56a5c65fe4ac859cdbb2f (patch) | |
tree | 6f56b36780fe1950350cea4a1ee8428b34c5dcf7 | |
parent | be97b3595915ebb03f1187daae0b011b1bece718 (diff) | |
download | qt-creator-b5befc694514d1b223b56a5c65fe4ac859cdbb2f.tar.gz |
QmlDesigner: Fix content library sections not collapsing after search
Also enabled the auto expand for textures and environments tabs
Fixes: QDS-8443
Change-Id: I190f919ccb2cff90c7cd151e65b77ebd52f0a87c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
3 files changed, 12 insertions, 2 deletions
diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibrary.qml index 8d69930847..53fae29a53 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 6a17a98a9d..6483ebdd6b 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 6027d4b690..dd6509b67e 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 |