Frodo45127 / rpfm

Rusted PackFile Manager (RPFM) is a... reimplementation in Rust and Qt5 of PackFile Manager (PFM), one of the best modding tools for Total War Games.
MIT License
357 stars 57 forks source link

The central pane's main filter has a bug when removing added filter lines #276

Closed Volcano467 closed 10 months ago

Volcano467 commented 10 months ago

Greetings,

I noticed this bug a while ago but forgot to report it, then it happened to me yesterday and remembered to mention it here:

So basically, in the central main pane, there is a filter available. You are able to press the + button and get more lines, where you can make your filter more advanced with different groups and exclusions, and so on. This is very useful. However the bug is, if you have several added lines, and then accidently don't remove them from the bottom up, and instead remove some in the middle, then it will remove ALL filter lines.

This in itself is not the issue, the issue is that once all lines are removed, it still permanently (in that table) retains all the automatically removed filter lines, so that your results above are now permanently filtered by those missing lines and so from then on, in that session, that tables is always filtered by conditions you can no longer remove or change. The only way to recover is to save and restart RPFM.

To see this bug, just go to a table and make something like 2 or 3 new filter lines, setting each one in some way to produce a filtered result. Then delete (- button) the second one from the top, and observe how all the other ones are removed as well, but then the above filtered result is still affected by the 3rd or 4th filtered line that is no longer present.


The fix here could be to have all those other filtered conditions get deleted once they are automatically removed when you delete a filter that causes the ones below to get auto-removed. Or, of course, a better fix would be to not actually remove the other filtered lines when one in the middle is removed, just shift them upwards.

Thanks!

Frodo45127 commented 10 months ago

Fixed for 4.2.1.