1
0
Fork 0

Launcher flight-planning: UI to sync initial location

Show a prompt message to ensure the initial startup location matches
the flight-plan departure airport.

https://sourceforge.net/p/flightgear/codetickets/2068/
This commit is contained in:
James Turner 2018-10-08 13:31:33 +01:00
parent 290261d1ae
commit 22c5c456cc

View file

@ -4,6 +4,10 @@ import FlightGear 1.0
import "."
Item {
id: root
// same name as Summary page
signal showSelectedLocation();
Flickable {
id: flick
@ -214,7 +218,25 @@ Item {
id: departureTime
label: qsTr("Departure time:")
}
}
Row {
height: childrenRect.height
width: parent.width
spacing: Style.margin
ClickableText {
width: parent.width
text: qsTr("The flight-plan departure airport (%1) is different to the " +
"initial location (%2). Click here to set the initial location to " +
"the flight-plan's airport.").
arg(_launcher.flightPlan.departure.name).arg(_launcher.location.description)
visible: _launcher.flightPlan.departure.valid &&
(_launcher.flightPlan.departure.guid !== _location.base.guid)
onClicked: {
_location.setBaseLocation(_launcher.flightPlan.departure)
root.showSelectedLocation();
}
}
}
// cruising speed + level