minetest-mods / unified_inventory

An extensible inventory mod which allows searching crafting and browsing for recipes in the same dialogue.
Other
50 stars 38 forks source link

Inventory pages cannot be set back to page 1 #197

Closed Niklp09 closed 2 years ago

Niklp09 commented 2 years ago

1.Use the arrows to go to a page other than 1. 2.Try brushing back to page 1, it won't work.

SmallJoker commented 2 years ago

The brush clears a filter. If there's no filter, this is a no-op. Use the double arrow buttons to move quickly.

Niklp09 commented 2 years ago

So why was it different before?

SmallJoker commented 2 years ago

Previously, filters were updated without regard on its previous state. I believe the brush is supposed to clear active filters (input box or selected item group) if there is one applied. For navigation, navigation buttons should be used. The recent changes clearly separated those two functionalities.

Niklp09 commented 2 years ago

Can you help me so that I can use the brush again at my place?

SmallJoker commented 2 years ago

Bug report about feature that works as intended

https://github.com/minetest-mods/unified_inventory/blob/dbe06be68b72e6ae2e3c98b610a7fd6610d35b3e/callbacks.lua#L207-L209

Remove the lines if and end and the reset button will flip the page to 1 regardless on whether there's a filter active.