I did the inventory sorting this way in a sequel's code some time ago, I'll try to look if it's possible to implement it in the first game in an easy way, too. They have completely different and separate source codes, so that's why I didn't do it earlier.