[PATCH] Fix "Select tags" dialog behavior

Dirk Hohndel dirk at hohndel.org
Fri May 17 07:14:14 PDT 2013


On Fri, 2013-05-17 at 13:05 +0300, Sergey Starosek wrote:
> * Apply filter only when OK button pressed
> * Restore tags selection from dive mask when Cancel button pressed
> * Fix selection logic when selected or all dives are filtered out (hide
>   profile, tooltips, etc.)
> 
> Not sure whether call to repaint_dive() is required.

Great catch - thanks for fixing this.
I'd like to make a couple of small changes, though.
We have a helper function that deals with deselecting dives correctly;
one thing that you are missing is that if you deselect the selected_dive
then the selected_dive variable needs to change. You do this if all
selected dives are hidden (amount_selected = 0), but not if only some of
the selected dives (including the selected_dive) are hidden.

The repaint_dive() call will then be required again as the selected_dive
could have changed.

I'll fix that here before pushing this out.

/D



More information about the subsurface mailing list