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
|
||||
name = db.unit_type_name(flight.unit_type)
|
||||
estimator = TotEstimator(self.package)
|
||||
delay = datetime.timedelta(
|
||||
seconds=int(estimator.mission_start_time(flight).total_seconds()))
|
||||
delay = estimator.mission_start_time(flight)
|
||||
return f"[{task}] {count} x {name} in {delay}"
|
||||
|
||||
def second_row_text(self, index: QModelIndex) -> str:
|
||||
@ -329,9 +328,7 @@ class PackageDelegate(QStyledItemDelegate):
|
||||
|
||||
def right_text(self, index: QModelIndex) -> str:
|
||||
package = self.package(index)
|
||||
delay = datetime.timedelta(
|
||||
seconds=int(package.time_over_target.total_seconds()))
|
||||
return f"TOT T+{delay}"
|
||||
return f"TOT T+{package.time_over_target}"
|
||||
|
||||
def paint(self, painter: QPainter, option: QStyleOptionViewItem,
|
||||
index: QModelIndex) -> None:
|
||||
|
||||
@ -349,7 +349,6 @@ class QLiberationMap(QGraphicsView):
|
||||
if time is None:
|
||||
tot = ""
|
||||
else:
|
||||
time = datetime.timedelta(seconds=int(time.total_seconds()))
|
||||
tot = f"{prefix} T+{time}"
|
||||
|
||||
pen = QPen(QColor("black"), 0.3)
|
||||
|
||||
@ -22,8 +22,7 @@ class QFlightItem(QStandardItem):
|
||||
self.setIcon(icon)
|
||||
self.setEditable(False)
|
||||
estimator = TotEstimator(self.package)
|
||||
delay = datetime.timedelta(
|
||||
seconds=int(estimator.mission_start_time(flight).total_seconds()))
|
||||
delay = estimator.mission_start_time(flight)
|
||||
self.setText("["+str(self.flight.flight_type.name[:6])+"] "
|
||||
+ str(self.flight.count) + " x " + db.unit_type_name(self.flight.unit_type)
|
||||
+ " in " + str(delay))
|
||||
|
||||
@ -19,8 +19,7 @@ class QFlightDepartureDisplay(QGroupBox):
|
||||
layout.addLayout(departure_row)
|
||||
|
||||
estimator = TotEstimator(package)
|
||||
delay = datetime.timedelta(
|
||||
seconds=int(estimator.mission_start_time(flight).total_seconds()))
|
||||
delay = estimator.mission_start_time(flight)
|
||||
|
||||
departure_row.addWidget(QLabel(
|
||||
f"Departing from <b>{flight.from_cp.name}</b>"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user