mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
filter: reset shown_dives in filter
The shown_dives variable was reset by the dive_list code. Arguably, the filter should keep track of the number of shown dives, so move the resetting there. This means adding a new "reset()" member function to the filter and call that instead of "updateAll()" when the core data is reset. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
dea1ef84d5
commit
e80c0d2c60
4 changed files with 15 additions and 8 deletions
|
|
@ -807,13 +807,9 @@ void process_loaded_dives()
|
|||
int i;
|
||||
struct dive *dive;
|
||||
|
||||
/* Register dive computer nick names and count shown dives. */
|
||||
shown_dives = 0;
|
||||
for_each_dive(i, dive) {
|
||||
if (!dive->hidden_by_filter)
|
||||
shown_dives++;
|
||||
/* Register dive computer nick names. */
|
||||
for_each_dive(i, dive)
|
||||
add_devices_of_dive(dive, &device_table);
|
||||
}
|
||||
|
||||
sort_dive_table(&dive_table);
|
||||
sort_trip_table(&trip_table);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue