diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-10-26 17:03:54 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-29 00:09:31 +0000 |
commit | 724055f0af4fb7cdb9f1570967fe4b34797f3419 (patch) | |
tree | 6aab8c34e7d0a6df1d6fe84bc5794e8eb5404b7d /map-widget/qml | |
parent | acd44467c1100a1a774cc644921b1dc33dca1266 (diff) | |
download | subsurface-724055f0af4fb7cdb9f1570967fe4b34797f3419.tar.gz |
Dive site: replace dive->dive_site_uuid by dive_site
Replace the UUID reference of struct dive by a pointer to dive_site.
This commit is rather large in lines, but nevertheless quite simple
since most of the UUID->pointer work was done in previous commits.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'map-widget/qml')
-rw-r--r-- | map-widget/qml/MapWidget.qml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/map-widget/qml/MapWidget.qml b/map-widget/qml/MapWidget.qml index 77e52ab56..77fd2141c 100644 --- a/map-widget/qml/MapWidget.qml +++ b/map-widget/qml/MapWidget.qml @@ -56,26 +56,26 @@ Item { anchorPoint.x: 0 anchorPoint.y: mapItemImage.height coordinate: model.coordinate - z: mapHelper.model.selectedUuid === model.uuid ? mapHelper.model.count - 1 : 0 + z: mapHelper.model.selectedDs === model.divesite ? mapHelper.model.count - 1 : 0 sourceItem: Image { id: mapItemImage - source: "qrc:///dive-location-marker" + (mapHelper.model.selectedUuid === model.uuid ? "-selected" : (mapHelper.editMode ? "-inactive" : "")) + "-icon" + source: "qrc:///dive-location-marker" + (mapHelper.model.selectedDs === model.divesite ? "-selected" : (mapHelper.editMode ? "-inactive" : "")) + "-icon" SequentialAnimation { id: mapItemImageAnimation PropertyAnimation { target: mapItemImage; property: "scale"; from: 1.0; to: 0.7; duration: 120 } PropertyAnimation { target: mapItemImage; property: "scale"; from: 0.7; to: 1.0; duration: 80 } } MouseArea { - drag.target: (mapHelper.editMode && mapHelper.model.selectedUuid === model.uuid) ? mapItem : undefined + drag.target: (mapHelper.editMode && mapHelper.model.selectedDs === model.divesite) ? mapItem : undefined anchors.fill: parent onClicked: { if (!mapHelper.editMode) - mapHelper.model.setSelectedUuid(model.uuid, true) + mapHelper.model.setSelected(model.divesite, true) } onDoubleClicked: map.doubleClickHandler(mapItem.coordinate) onReleased: { - if (mapHelper.editMode && mapHelper.model.selectedUuid === model.uuid) { - mapHelper.updateCurrentDiveSiteCoordinatesFromMap(mapHelper.model.selectedUuid, mapItem.coordinate) + if (mapHelper.editMode && mapHelper.model.selectedDs === model.divesite) { + mapHelper.updateCurrentDiveSiteCoordinatesFromMap(mapHelper.model.selectedDs, mapItem.coordinate) } } } @@ -94,7 +94,7 @@ Item { id: mapItemText text: model.name font.pointSize: 11.0 - color: mapHelper.model.selectedUuid === model.uuid ? "white" : "lightgrey" + color: mapHelper.model.selectedDs === model.divesite ? "white" : "lightgrey" } } } |