mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Dive list: access header via filter-model
The dive list accesses the filter model, therefore it makes sense to also get the header data from there, even if they are only forwarded from the source model. This makes control flow more logical and will allow us to remove the global DiveTripModel instance. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e7dafe36aa
commit
0f417a3bc1
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ void DiveListView::calculateInitialColumnWidth(int col)
|
|||
int em = metrics.width('m');
|
||||
int zw = metrics.width('0');
|
||||
|
||||
QString header_txt = DiveTripModelBase::instance()->headerData(col, Qt::Horizontal, Qt::DisplayRole).toString();
|
||||
QString header_txt = MultiFilterSortModel::instance()->headerData(col, Qt::Horizontal, Qt::DisplayRole).toString();
|
||||
int width = metrics.width(header_txt);
|
||||
int sw = 0;
|
||||
switch (col) {
|
||||
|
|
Loading…
Reference in a new issue