kkujansuu / gramps

MIT License
1 stars 1 forks source link

Select the the last used filter at the start of FilterParam #29

Open HelgeGitHub opened 1 year ago

HelgeGitHub commented 1 year ago

Currently the plugin starts always with the first filter in the list of all filters for the Person category.

If one develops filters and starts to use these, than one will leave the plugin, try somewhat (e. g. a report), find some differences against the ideas behind and goes back to the plugin. In these cases it would be very helpful, to get immediate access to the last visited filter.

emyoulation commented 1 year ago

In the current state of Gramps development, saving a reference to a Custom Filter is done 3 different ways. And none of those survive well when there are changes to the list of Filter or query rules.

This problem was only identified in the last week.

A feature that 'remembers last edited' would have to use .ini files to store another fragile reference. It would require significant error handling code. And that code would have to be re-written when the problems referencing filters are resolved.

This idea would be helpful since it eliminates extra steps in normal workflow. But implementation should be deferred until the Gramps XML external referencing of Custom Filters is fixed.

HelgeGitHub commented 1 year ago

agreed

kkujansuu commented 1 year ago

What problem are you referring to in the message above?

I don't see a problem saving the last used filter in an .ini file. I would just save two strings: the namespace (Person etc) and the filter name.

When FilterParams starts it could look up those values and select the named filter if it still exists. If it doesn't then it could select the first filter in the namespace or work as it does now.