mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Remove rounding from waypoint timing in the UI.
This is behaving strangely on some machines. Stop hiding the details in the UI while we debug.
This commit is contained in:
parent
08f0c9d30a
commit
ab67a38ca5
@ -64,8 +64,7 @@ class FlightDelegate(QStyledItemDelegate):
|
|||||||
count = flight.count
|
count = flight.count
|
||||||
name = db.unit_type_name(flight.unit_type)
|
name = db.unit_type_name(flight.unit_type)
|
||||||
estimator = TotEstimator(self.package)
|
estimator = TotEstimator(self.package)
|
||||||
delay = datetime.timedelta(
|
delay = estimator.mission_start_time(flight)
|
||||||
seconds=int(estimator.mission_start_time(flight).total_seconds()))
|
|
||||||
return f"[{task}] {count} x {name} in {delay}"
|
return f"[{task}] {count} x {name} in {delay}"
|
||||||
|
|
||||||
def second_row_text(self, index: QModelIndex) -> str:
|
def second_row_text(self, index: QModelIndex) -> str:
|
||||||
@ -329,9 +328,7 @@ class PackageDelegate(QStyledItemDelegate):
|
|||||||
|
|
||||||
def right_text(self, index: QModelIndex) -> str:
|
def right_text(self, index: QModelIndex) -> str:
|
||||||
package = self.package(index)
|
package = self.package(index)
|
||||||
delay = datetime.timedelta(
|
return f"TOT T+{package.time_over_target}"
|
||||||
seconds=int(package.time_over_target.total_seconds()))
|
|
||||||
return f"TOT T+{delay}"
|
|
||||||
|
|
||||||
def paint(self, painter: QPainter, option: QStyleOptionViewItem,
|
def paint(self, painter: QPainter, option: QStyleOptionViewItem,
|
||||||
index: QModelIndex) -> None:
|
index: QModelIndex) -> None:
|
||||||
|
|||||||
@ -349,7 +349,6 @@ class QLiberationMap(QGraphicsView):
|
|||||||
if time is None:
|
if time is None:
|
||||||
tot = ""
|
tot = ""
|
||||||
else:
|
else:
|
||||||
time = datetime.timedelta(seconds=int(time.total_seconds()))
|
|
||||||
tot = f"{prefix} T+{time}"
|
tot = f"{prefix} T+{time}"
|
||||||
|
|
||||||
pen = QPen(QColor("black"), 0.3)
|
pen = QPen(QColor("black"), 0.3)
|
||||||
|
|||||||
@ -22,8 +22,7 @@ class QFlightItem(QStandardItem):
|
|||||||
self.setIcon(icon)
|
self.setIcon(icon)
|
||||||
self.setEditable(False)
|
self.setEditable(False)
|
||||||
estimator = TotEstimator(self.package)
|
estimator = TotEstimator(self.package)
|
||||||
delay = datetime.timedelta(
|
delay = estimator.mission_start_time(flight)
|
||||||
seconds=int(estimator.mission_start_time(flight).total_seconds()))
|
|
||||||
self.setText("["+str(self.flight.flight_type.name[:6])+"] "
|
self.setText("["+str(self.flight.flight_type.name[:6])+"] "
|
||||||
+ str(self.flight.count) + " x " + db.unit_type_name(self.flight.unit_type)
|
+ str(self.flight.count) + " x " + db.unit_type_name(self.flight.unit_type)
|
||||||
+ " in " + str(delay))
|
+ " in " + str(delay))
|
||||||
|
|||||||
@ -19,8 +19,7 @@ class QFlightDepartureDisplay(QGroupBox):
|
|||||||
layout.addLayout(departure_row)
|
layout.addLayout(departure_row)
|
||||||
|
|
||||||
estimator = TotEstimator(package)
|
estimator = TotEstimator(package)
|
||||||
delay = datetime.timedelta(
|
delay = estimator.mission_start_time(flight)
|
||||||
seconds=int(estimator.mission_start_time(flight).total_seconds()))
|
|
||||||
|
|
||||||
departure_row.addWidget(QLabel(
|
departure_row.addWidget(QLabel(
|
||||||
f"Departing from <b>{flight.from_cp.name}</b>"
|
f"Departing from <b>{flight.from_cp.name}</b>"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user