amiga-mui / muidev

:mage_man: Magic User Interface (MUI) – Documentation+Releases
http://muidev.de
55 stars 0 forks source link

MUIA_List_Format isn't updated on MUIA_List_TitleClick #338

Closed afalkenhahn closed 3 years ago

afalkenhahn commented 3 years ago

I'm listening to MUIA_List_TitleClick. When clicking the header to toggle between ascending and descending sorting, MUIA_List_Format still contains the old format. To see the problem, just click the header in column 1 in the attached sample. It will switch sorting to descending. In the MUIA_List_TitleClick hook, however, MUIA_List_Format is still reported as ORDER=ASC. On MorphOS this is working correctly and the hook is reporting ORDER=DESC instead. main.txt

tboeckel commented 3 years ago

Fixed in the next nightly build.

MUIA_List_TitleClick was triggered before the actions regarding resorting were applied. Furthermore MUIA_List_Format now returns a format string with only one ORDER flag at most to signal the current sort column and order.

afalkenhahn commented 3 years ago

Furthermore MUIA_List_Format now returns a format string with only one ORDER flag at most to signal the current sort column and order.

Oh no, please undo this change! The ORDER flag should be present for every column. That's what MorphOS does too (even though it shortens it to O=ASC and O=DESC). I definitely need this. E.g. even if a column is currently not the sort column, it should still be possible to get its sort order through MUIA_List_Format so the ORDER flag should be present for every column that is sortable. MorphOS does that too and it makes perfect sense.

tboeckel commented 3 years ago

Ok, this will be reverted in the next nightly build.