Skip to content

Commit

Permalink
Work around an upstream Qt crash when a relation editor combobox lead…
Browse files Browse the repository at this point in the history
…s to its attribute item to be hidden
  • Loading branch information
nirvn committed Nov 10, 2024
1 parent 7892761 commit 741ab74
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/qml/RelationCombobox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,17 @@ Item {
topMargin: mainWindow.sceneTopMargin
bottomMargin: mainWindow.sceneTopMargin

onAboutToShow: {
contentItem.model = comboBox.delegateModel;
}

onAboutToHide: {
contentItem.model = null;
}

contentItem: ListView {
clip: true
implicitHeight: Math.min(mainWindow.height - mainWindow.sceneTopMargin - mainWindow.sceneTopMargin, contentHeight)
model: comboBox.popup.visible ? comboBox.delegateModel : null
currentIndex: comboBox.highlightedIndex

section.property: featureListModel.groupField != "" ? "groupFieldValue" : ""
Expand Down

0 comments on commit 741ab74

Please sign in to comment.