Mobile: change location combobox id

Change the id of the location combobox to math the naming scheme
of the other comboboxes.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
Joakim Bygdell 2018-03-09 15:24:54 +01:00 committed by Dirk Hohndel
parent 07fb1db3ad
commit 94e0ec8dc9

View file

@ -11,8 +11,8 @@ Item {
property int dive_id property int dive_id
property int number property int number
property alias dateText: txtDate.text property alias dateText: txtDate.text
property alias locationText: txtLocation.editText property alias locationText: locationBox.editText
property alias locationIndex: txtLocation.currentIndex property alias locationIndex: locationBox.currentIndex
property alias gpsText: txtGps.text property alias gpsText: txtGps.text
property alias airtempText: txtAirTemp.text property alias airtempText: txtAirTemp.text
property alias watertempText: txtWaterTemp.text property alias watertempText: txtWaterTemp.text
@ -36,7 +36,7 @@ Item {
property alias divemasterModel: divemasterBox.model property alias divemasterModel: divemasterBox.model
property alias buddyModel: buddyBox.model property alias buddyModel: buddyBox.model
property alias cylinderModel: cylinderBox.model property alias cylinderModel: cylinderBox.model
property alias locationModel: txtLocation.model property alias locationModel: locationBox.model
property int rating property int rating
property int visibility property int visibility
@ -63,7 +63,7 @@ Item {
function saveData() { function saveData() {
diveDetailsPage.state = "view" // run the transition diveDetailsPage.state = "view" // run the transition
// apply the changes to the dive_table // apply the changes to the dive_table
manager.commitChanges(dive_id, detailsEdit.dateText, detailsEdit.locationText, detailsEdit.gpsText, detailsEdit.durationText, manager.commitChanges(dive_id, detailsEdit.dateText, locationBox.editText, detailsEdit.gpsText, detailsEdit.durationText,
detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText, detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText,
suitBox.currentText != "" ? suitBox.currentText : suitBox.editText, buddyBox.editText, suitBox.currentText != "" ? suitBox.currentText : suitBox.editText, buddyBox.editText,
divemasterBox.currentText != "" ? divemasterBox.currentText : divemasterBox.editText, divemasterBox.currentText != "" ? divemasterBox.currentText : divemasterBox.editText,
@ -81,7 +81,7 @@ Item {
var newIdx = diveModel.getIdxForId(dive_id) var newIdx = diveModel.getIdxForId(dive_id)
diveDetailsListView.currentIndex = newIdx diveDetailsListView.currentIndex = newIdx
diveDetailsListView.currentItem.modelData.date = detailsEdit.dateText diveDetailsListView.currentItem.modelData.date = detailsEdit.dateText
diveDetailsListView.currentItem.modelData.location = detailsEdit.locationText diveDetailsListView.currentItem.modelData.location = locationBox.currentText
diveDetailsListView.currentItem.modelData.duration = detailsEdit.durationText diveDetailsListView.currentItem.modelData.duration = detailsEdit.durationText
diveDetailsListView.currentItem.modelData.depth = detailsEdit.depthText diveDetailsListView.currentItem.modelData.depth = detailsEdit.depthText
diveDetailsListView.currentItem.modelData.airtemp = detailsEdit.airtempText diveDetailsListView.currentItem.modelData.airtemp = detailsEdit.airtempText
@ -133,7 +133,7 @@ Item {
font.pointSize: subsurfaceTheme.smallPointSize font.pointSize: subsurfaceTheme.smallPointSize
} }
Controls.ComboBox { Controls.ComboBox {
id: txtLocation id: locationBox
editable: true editable: true
flat: true flat: true
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ? model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?