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 a9f6936 commit b9e94da
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 @@ -327,10 +327,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 b9e94da

Please sign in to comment.