forked from qt-creator/qt-creator
QmlDesigner: Fix toggle section expand after choosing expand all
Fixes: QDS-8104 Change-Id: I6191a7b249490e6193acdd8b618c0817a3fc6ab3 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -270,6 +270,8 @@ Item {
|
|||||||
expanded: bundleCategoryExpanded
|
expanded: bundleCategoryExpanded
|
||||||
expandOnClick: false
|
expandOnClick: false
|
||||||
onToggleExpand: bundleCategoryExpanded = !bundleCategoryExpanded
|
onToggleExpand: bundleCategoryExpanded = !bundleCategoryExpanded
|
||||||
|
onExpand: bundleCategoryExpanded = true
|
||||||
|
onCollapse: bundleCategoryExpanded = false
|
||||||
|
|
||||||
Grid {
|
Grid {
|
||||||
width: scrollView.width
|
width: scrollView.width
|
||||||
|
@@ -72,10 +72,19 @@ Item {
|
|||||||
Connections {
|
Connections {
|
||||||
target: Controller
|
target: Controller
|
||||||
function onCollapseAll() {
|
function onCollapseAll() {
|
||||||
if (collapsible)
|
if (collapsible) {
|
||||||
section.expanded = false
|
if (section.expandOnClick)
|
||||||
|
section.expanded = false
|
||||||
|
else
|
||||||
|
section.collapse()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function onExpandAll() {
|
||||||
|
if (section.expandOnClick)
|
||||||
|
section.expanded = true
|
||||||
|
else
|
||||||
|
section.expand()
|
||||||
}
|
}
|
||||||
function onExpandAll() { section.expanded = true }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signal drop(var drag)
|
signal drop(var drag)
|
||||||
@@ -83,6 +92,8 @@ Item {
|
|||||||
signal dropExit()
|
signal dropExit()
|
||||||
signal showContextMenu()
|
signal showContextMenu()
|
||||||
signal toggleExpand()
|
signal toggleExpand()
|
||||||
|
signal expand()
|
||||||
|
signal collapse()
|
||||||
|
|
||||||
DropArea {
|
DropArea {
|
||||||
id: dropArea
|
id: dropArea
|
||||||
|
Reference in New Issue
Block a user