1) Robert's patch; 2) the filter panel

Dirk Hohndel dirk at hohndel.org
Tue Nov 11 02:48:41 PST 2014


On Tue, Nov 11, 2014 at 01:52:15AM -0800, Dirk Hohndel wrote:
> 
> I talked to Tomaz yesterday and he said he had updated patches for the
> filter that got them closer to your design and was still debugging them.
> Once he sends that I can try and add the counts. Doing that now is
> likely to cause conflicting changes. And it’s almost 2am and I may not
> be in the best mental state to write code. Or heck, maybe that slight
> delirium IS the best time to write code. Let me consider…

I take it back, this was quite easy. The design of the filters makes this
rather straight forward.

I just pushed two sample commits that add the count for tags. Maybe
someone else wants to do something similar for people and locations.

The code right now is quite naive and keeps walking the dive list over and
over again. I haven't done any measurements but it might be worth while to
cache this data and invalidate it when the user edits anything.
Not sure if that's worth it.

Worse, this makes a bug in the selection code rather obvious. When a trip
is selected, all dives in the trip are selected, regardless of whether
they are visible under current filter settings. I'll try to fix that next,
before I spend time on adding the counts to the other filters.

/D


More information about the subsurface mailing list