mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Filter: move number of shown dives to core
We mark hidden/shown dives in the core but store the number of shown dives in the MultiFilterSortModel. Move this datum to the core for improved locality. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
cbd98edb73
commit
2d09819ddf
5 changed files with 10 additions and 10 deletions
|
@ -2,6 +2,7 @@
|
|||
#include "desktop-widgets/simplewidgets.h"
|
||||
#include "desktop-widgets/mainwindow.h"
|
||||
#include "core/qthelper.h"
|
||||
#include "core/divelist.h"
|
||||
#include "core/settings/qPrefUnit.h"
|
||||
|
||||
#include <QDoubleSpinBox>
|
||||
|
@ -242,8 +243,7 @@ void FilterWidget2::filterDataChanged(const FilterData &data)
|
|||
QString FilterWidget2::shownText()
|
||||
{
|
||||
if (isActive())
|
||||
return tr("%L1/%L2 shown").arg(MultiFilterSortModel::instance()->divesDisplayed)
|
||||
.arg(dive_table.nr);
|
||||
return tr("%L1/%L2 shown").arg(shown_dives).arg(dive_table.nr);
|
||||
else
|
||||
return tr("%L1 dives").arg(dive_table.nr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue