mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Now possible to create/delete flights.
This commit is contained in:
@@ -2,7 +2,7 @@ from PySide2.QtWidgets import QFrame, QGridLayout, QLabel, QPushButton, QVBoxLay
|
||||
|
||||
from gen.flights.flight import Flight
|
||||
from qt_ui.windows.mission.flight.waypoints.QFlightWaypointList import QFlightWaypointList
|
||||
from qt_ui.windows.mission.flight.waypoints.QWaypointSelectionWindow import QWaypointSelectionWindow
|
||||
from qt_ui.windows.mission.flight.waypoints.QPredefinedWaypointSelectionWindow import QPredefinedWaypointSelectionWindow
|
||||
from game import Game
|
||||
|
||||
class QFlightWaypointTab(QFrame):
|
||||
@@ -22,7 +22,6 @@ class QFlightWaypointTab(QFrame):
|
||||
self.delete_selected = QPushButton("Delete Selected")
|
||||
self.delete_selected.clicked.connect(self.on_delete_waypoint)
|
||||
|
||||
|
||||
layout.addWidget(self.flight_waypoint_list,0,0)
|
||||
rlayout.addWidget(self.open_fast_waypoint_button)
|
||||
rlayout.addWidget(self.delete_selected)
|
||||
@@ -37,5 +36,5 @@ class QFlightWaypointTab(QFrame):
|
||||
self.flight_waypoint_list.update_list()
|
||||
|
||||
def on_fast_waypoint(self):
|
||||
self.subwindow = QWaypointSelectionWindow(self.game, self.flight, self.flight_waypoint_list)
|
||||
self.subwindow = QPredefinedWaypointSelectionWindow(self.game, self.flight, self.flight_waypoint_list)
|
||||
self.subwindow.show()
|
||||
@@ -15,11 +15,11 @@ PREDEFINED_WAYPOINT_CATEGORIES = [
|
||||
]
|
||||
|
||||
|
||||
class QWaypointSelectionWindow(QDialog):
|
||||
class QPredefinedWaypointSelectionWindow(QDialog):
|
||||
|
||||
|
||||
def __init__(self, game: Game, flight: Flight, flight_waypoint_list):
|
||||
super(QWaypointSelectionWindow, self).__init__()
|
||||
super(QPredefinedWaypointSelectionWindow, self).__init__()
|
||||
self.game = game
|
||||
self.flight = flight
|
||||
self.setWindowFlags(Qt.WindowStaysOnTopHint)
|
||||
Reference in New Issue
Block a user