diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-12-09 15:25:16 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-12-10 18:45:30 -0800 |
commit | 0f417a3bc1f282b34509df1c9295197522344a55 (patch) | |
tree | fb02468952b1421c5d426b5234068636be45af8b /desktop-widgets/divelistview.cpp | |
parent | e7dafe36aabfe45a4a0b8d6b8056fa9e4d03aaf4 (diff) | |
download | subsurface-0f417a3bc1f282b34509df1c9295197522344a55.tar.gz |
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>
Diffstat (limited to 'desktop-widgets/divelistview.cpp')
-rw-r--r-- | desktop-widgets/divelistview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index 76fa8fbd8..dd74bd46b 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -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) { |