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
|
// make sure categories with matches are expanded
|
||||||
materialsView.expandVisibleSections()
|
materialsView.expandVisibleSections()
|
||||||
|
texturesView.expandVisibleSections()
|
||||||
|
environmentsView.expandVisibleSections()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@ HelperWidgets.ScrollView {
|
|||||||
for (let i = 0; i < categoryRepeater.count; ++i) {
|
for (let i = 0; i < categoryRepeater.count; ++i) {
|
||||||
let cat = categoryRepeater.itemAt(i)
|
let cat = categoryRepeater.itemAt(i)
|
||||||
if (cat.visible && !cat.expanded)
|
if (cat.visible && !cat.expanded)
|
||||||
cat.expanded = true
|
cat.expandSection()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,6 +58,10 @@ HelperWidgets.ScrollView {
|
|||||||
expandOnClick: false
|
expandOnClick: false
|
||||||
onToggleExpand: bundleCategoryExpanded = !bundleCategoryExpanded
|
onToggleExpand: bundleCategoryExpanded = !bundleCategoryExpanded
|
||||||
|
|
||||||
|
function expandSection() {
|
||||||
|
bundleCategoryExpanded = true
|
||||||
|
}
|
||||||
|
|
||||||
Grid {
|
Grid {
|
||||||
width: root.width
|
width: root.width
|
||||||
leftPadding: 5
|
leftPadding: 5
|
||||||
|
@@ -33,7 +33,7 @@ HelperWidgets.ScrollView {
|
|||||||
for (let i = 0; i < categoryRepeater.count; ++i) {
|
for (let i = 0; i < categoryRepeater.count; ++i) {
|
||||||
let cat = categoryRepeater.itemAt(i)
|
let cat = categoryRepeater.itemAt(i)
|
||||||
if (cat.visible && !cat.expanded)
|
if (cat.visible && !cat.expanded)
|
||||||
cat.expanded = true
|
cat.expandSection()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Column {
|
Column {
|
||||||
@@ -58,6 +58,10 @@ HelperWidgets.ScrollView {
|
|||||||
expandOnClick: false
|
expandOnClick: false
|
||||||
onToggleExpand: bundleCategoryExpanded = !bundleCategoryExpanded
|
onToggleExpand: bundleCategoryExpanded = !bundleCategoryExpanded
|
||||||
|
|
||||||
|
function expandSection() {
|
||||||
|
bundleCategoryExpanded = true
|
||||||
|
}
|
||||||
|
|
||||||
Grid {
|
Grid {
|
||||||
width: root.width
|
width: root.width
|
||||||
leftPadding: 5
|
leftPadding: 5
|
||||||
|
Reference in New Issue
Block a user