forked from qt-creator/qt-creator
Fix property editor expand not working regression
Regression caused by 43eaa09b11
Change-Id: Ia749672464790b235f292efe09b6cc48e1df6b6e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -138,6 +138,7 @@ ScrollView {
|
|||||||
topPadding: 0
|
topPadding: 0
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
expanded: importExpanded
|
expanded: importExpanded
|
||||||
|
expandOnClick: false
|
||||||
onToggleExpand: importExpanded = !importExpanded
|
onToggleExpand: importExpanded = !importExpanded
|
||||||
onShowContextMenu: {
|
onShowContextMenu: {
|
||||||
importToRemove = importUsed ? "" : importUrl
|
importToRemove = importUsed ? "" : importUrl
|
||||||
@@ -161,6 +162,7 @@ ScrollView {
|
|||||||
caption: categoryName + " (" + itemModel.rowCount() + ")"
|
caption: categoryName + " (" + itemModel.rowCount() + ")"
|
||||||
visible: categoryVisible
|
visible: categoryVisible
|
||||||
expanded: categoryExpanded
|
expanded: categoryExpanded
|
||||||
|
expandOnClick: false
|
||||||
onToggleExpand: categoryExpanded = !categoryExpanded
|
onToggleExpand: categoryExpanded = !categoryExpanded
|
||||||
|
|
||||||
Grid {
|
Grid {
|
||||||
|
@@ -47,6 +47,7 @@ Item {
|
|||||||
property int level: 0
|
property int level: 0
|
||||||
property int levelShift: 10
|
property int levelShift: 10
|
||||||
property bool hideHeader: false
|
property bool hideHeader: false
|
||||||
|
property bool expandOnClick: true // if false, toggleExpand signal will be emitted instead
|
||||||
|
|
||||||
onHideHeaderChanged:
|
onHideHeaderChanged:
|
||||||
{
|
{
|
||||||
@@ -92,7 +93,10 @@ Item {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
if (mouse.button === Qt.LeftButton) {
|
if (mouse.button === Qt.LeftButton) {
|
||||||
trans.enabled = true
|
trans.enabled = true
|
||||||
section.toggleExpand()
|
if (expandOnClick)
|
||||||
|
expanded = !expanded
|
||||||
|
else
|
||||||
|
section.toggleExpand()
|
||||||
} else {
|
} else {
|
||||||
section.showContextMenu()
|
section.showContextMenu()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user