Multi Filter

Tomaz Canabrava tcanabrava at
Thu Oct 2 07:59:34 PDT 2014

On Thu, Oct 2, 2014 at 11:30 AM, Dirk Hohndel <dirk at> wrote:

> On Wed, Oct 01, 2014 at 04:37:43PM -0300, Tomaz Canabrava wrote:
> >
> > This new version of the TagFilterSortModel actually accepts
> > *any* new MultiFilterInterface
> >
> > So, how to use it to create a new filter:
> >
> > Implement a class that inherits from MultiFilterInterface
> >
> > Implement the filterRow method
> >
> > TagFilterSortModel::instance->add( myClass );
> So right now this is infrastructure without a consumer...
> > +void TagFilterSortModel::myInvalidate()
> > +{
> > +     qDebug() << "Just making sure..."; makeSure = true;
> :-)
> I'll drop the qDebug() and fix a few minor whitespace things.
> One other odd thing that I noticed is that when we clear the filter, the
> selected row in the dive list is no longer marked as selected. Let me
> explain better. I have a tag for which I have only one dive that has that
> tag. If I filter for that tag only that one dive is shown (and selected).
> Now if I clear the filter, all dives are shown in the dive list. A
> DIFFERENT trip from the one that contains the dive that is still selected
> is expanded, the trip with that dive is collapsed. If I manually expand
> the trip, the dive is not marked as selected, either.
> Can you investigate what's going on there?

Sure. What might be happening is that when the Qt infrastructure
repopulates the interface because of the filter change, it *might* be
losing selection. I'll be looking this.
It's also not a infrastructure without a consumer, it's already using it
for the TagFiltering, as I used it to test if things were running.
I need to add now the proper UI for it, so new filters can be easily added.

> Thanks
> /D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the subsurface mailing list