Skip to content
Permalink
Browse files

[QgsQuick] Fix overlaped variable name with QT widget's variable

Qt 5.14 introduced currentValue variable for combobox widget which clashes with qgsquick variable
  • Loading branch information
vsklencar authored and wonder-sk committed Apr 28, 2020
1 parent e89b728 commit 35576d72f2bb46057c2cc7ee7f3480b0e59ad772
@@ -38,7 +38,7 @@ Item {
QgsQuick.EditorWidgetComboBox {
// Reversed to model's key-value map. It is used to find index according current value
property var reverseConfig: ({})
property var currentValue: value
property var currentEditorValue: value

comboStyle: customStyle.fields
textRole: 'display'
@@ -81,7 +81,7 @@ Item {
}

// Workaround to get a signal when the value has changed
onCurrentValueChanged: {
onCurrentEditorValueChanged: {
currentIndex = find(reverseConfig[value])
}

@@ -37,7 +37,7 @@ Item {

QgsQuick.EditorWidgetComboBox {

property var currentValue: value
property var currentEditorValue: value

comboStyle: customStyle.fields
textRole: 'display'
@@ -58,7 +58,7 @@ Item {
}

// Called when the same form is used for a different feature
onCurrentValueChanged: {
onCurrentEditorValueChanged: {
currentIndex = vrModel.rowForKey(value);
}

0 comments on commit 35576d7

Please sign in to comment.
You can’t perform that action at this time.