Fix waypoints list width (#3383)

Fix width of Flight Waypoints List. The vertical header width was
returning 0 so the table width was under estimated leading to the table
being too narrow. Used sizeHint to get vertical header width to work
around this issue.
This commit is contained in:
zhexu14 2024-04-24 07:55:29 +10:00 committed by GitHub
parent 13ff69c4df
commit 99089cc3d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,7 +83,7 @@ class QFlightWaypointList(QTableView):
self.model.index(current_index, 0), QItemSelectionModel.Select
)
self.resizeColumnsToContents()
total_column_width = self.verticalHeader().width() + self.lineWidth()
total_column_width = self.verticalHeader().sizeHint().width() + self.lineWidth()
for i in range(0, self.model.columnCount()):
total_column_width += self.columnWidth(i) + self.lineWidth()
self.setFixedWidth(total_column_width)