pierce-smith1 / yok.scr

the doughbyte-themed windows screensaver
https://doughbyte.com/aut/yokscr
11 stars 1 forks source link

When deleting palettes in the palette customizer, the palette your selection is moved to is effectively random #53

Closed pierce-smith1 closed 7 months ago

pierce-smith1 commented 7 months ago

This is debatably not a bug, but it's odd behavior that I'm almost 100% certain will get someone in trouble.

Say you have palettes like this, and you have the last one selected:

a
b
c
d
e <--

Then let's say you want to delete everything except for a and b. Intuitively, you may want to just spam the delete button 3 times, thinking that your selection will move to d then to c. But no, in reality it's based on the order you added them, and to make things worse the order they are displayed is different from that (it's alphabetical), so it's effectively random. Your selection may suddenly jump to a or b after deleting e for instance.

The fix for this makes the selection move to whatever item was before the one you deleted, and if you deleted the first one, then it becomes whatever the new first item is. That may involve making the display order not alphabetical.