mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive list view: setup columns in constructor
The column-widths must only be set once the source-model is that. The old code realized this with a rather complicated logic. Instead, simply set the source-model in the constructor and set the column widths after that. Rename the corresponding function from "setupUi" to "setColumnWidths". Moreover, the setupUi function had different code-paths for the first and other calls. Since it is only called once, remove the other code paths. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
079b99135a
commit
67a875ef81
2 changed files with 7 additions and 20 deletions
|
|
@ -77,7 +77,7 @@ private:
|
|||
/* if dive_trip_t is null, there's no problem. */
|
||||
QMultiHash<dive_trip_t *, int> selectedDives;
|
||||
void merge_trip(const QModelIndex &a, const int offset);
|
||||
void setupUi();
|
||||
void setColumnWidths();
|
||||
void calculateInitialColumnWidth(const DiveTripModel &tripModel, int col);
|
||||
void backupExpandedRows();
|
||||
void restoreExpandedRows();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue