Commit f171b89b authored by Volker Krause's avatar Volker Krause
Browse files

Show the arrival location if we have no departure

That's useful on the final destination.
parent 76b7642e
......@@ -155,7 +155,12 @@ Kirigami.Page {
var idx = platformModel.index(platformModel.departurePlatformRow, 0);
map.view.floorLevel = platformModel.data(idx, PlatformModel.LevelRole)
map.view.centerOnGeoCoordinate(platformModel.data(idx, PlatformModel.CoordinateRole));
map.view.setZoomLevel(19, Qt.point(map.width / 2.0, map.height/ 2.0));
map.view.setZoomLevel(19, Qt.point(map.width / 2.0, map.height / 2.0));
} else if (root.departurePlatformName == "" && platformModel.arrivalPlatformRow >= 0) {
var idx = platformModel.index(platformModel.arrivalPlatformRow, 0);
map.view.floorLevel = platformModel.data(idx, PlatformModel.LevelRole)
map.view.centerOnGeoCoordinate(platformModel.data(idx, PlatformModel.CoordinateRole));
map.view.setZoomLevel(19, Qt.point(map.width / 2.0, map.height / 2.0));
}
}
}
......@@ -174,7 +179,12 @@ Kirigami.Page {
var idx = gateModel.index(gateModel.departureGateRow, 0);
map.view.floorLevel = gateModel.data(idx, GateModel.LevelRole)
map.view.centerOnGeoCoordinate(gateModel.data(idx, GateModel.CoordinateRole));
map.view.setZoomLevel(18, Qt.point(map.width / 2.0, map.height/ 2.0));
map.view.setZoomLevel(18, Qt.point(map.width / 2.0, map.height / 2.0));
} else if (root.departureGateName == "" && platformModel.arrivalGateRow >= 0) {
var idx = platformModel.index(platformModel.arrivalGateRow, 0);
map.view.floorLevel = platformModel.data(idx, PlatformModel.LevelRole)
map.view.centerOnGeoCoordinate(platformModel.data(idx, PlatformModel.CoordinateRole));
map.view.setZoomLevel(19, Qt.point(map.width / 2.0, map.height / 2.0));
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment