forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -42,6 +42,8 @@ Item {
|
||||
|
||||
// make sure categories with matches are expanded
|
||||
materialsView.expandVisibleSections()
|
||||
texturesView.expandVisibleSections()
|
||||
environmentsView.expandVisibleSections()
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user