Allow editing pretty_name for waypoints

This commit is contained in:
Raffson 2023-08-26 19:19:54 +02:00
parent f22ad17651
commit f5cb293e44
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 3 additions and 1 deletions

View File

@ -8,4 +8,4 @@ class QWaypointItem(QStandardItem):
super(QWaypointItem, self).__init__()
self.number = number
self.setText("{:<16}".format(point.pretty_name))
self.setEditable(False)
self.setEditable(True)

View File

@ -106,6 +106,8 @@ class QFlightWaypointList(QTableView):
altitude = self.model.item(i, 1).text()
altitude_feet = float(altitude)
self.flight.flight_plan.waypoints[i].alt = Distance.from_feet(altitude_feet)
name = self.model.item(i, 0).text()
self.flight.flight_plan.waypoints[i].pretty_name = name
def tot_text(self, flight: Flight, waypoint: FlightWaypoint) -> str:
if waypoint.waypoint_type == FlightWaypointType.TAKEOFF: