Opened 3 weeks ago

Closed 3 weeks ago

#384 closed bug (fixed)

Active item behaviour when sorting a listview

Reported by: jPV Owned by: Thore Böckelmann
Priority: normal Milestone: 5.0-2018R2
Component: List.mui Version: 5.0-2017R4
Severity: minor Keywords:
Cc: OS Platform: All
Blocked By: Blocking:
Release Notes:

Description

Summary

I came up with the issue when coding a Hollywood program. If I have an active item in a listview, and then sort the listview, activation doesn't follow the item that was originally activated. After a sort, a new item at the original item's position is activated, and this doesn't sound logical to me, because my program doesn't know anymore which item was activated by user before the sorting. This also behaves differently, for example, to MorphOS MUI. On MorphOS the same item is still activated as originally selected, but in a different position on the list (assuming the order changed in the sort).

Steps to reproduce

  1. Activate an item in a listview, let's say the bottom one
  2. Sort the listview so that position of the previously activated item changes, let's say that the item in the step 1 will be at top after sorting

Expected results

The item at top should be active

Actual results

The bottom item is active

Notes

I've personally tested this with MUI version that comes with OS4.1FE by default, but it seems to be an issue also with newer versions (my betatester reported the issue under 5.0-2017R4/OS4).

I think it's quite likely MUI's fault, but please correct me if it looks to be Hollywood's fault after all.

There may also be a problem with selecting items on newer MUI versions (works for me under OS4.1FE's MUI, but apparently can't select any items codewise from Hollywood under that 5.0-2017R4), but I don't have any more precise information about it atm, but if it's related or comes up when looking at the code…

Here's more information and a short example:
https://forums.hollywood-mal.com/viewtopic.php?f=21&t=1926

Change History (2)

comment:1 Changed 3 weeks ago by Thore Böckelmann

Component: Listview.muiList.mui
Milestone: future release5.0-2018R2
OS Platform: undefinedAll
Owner: set to Thore Böckelmann
Priority: undecidednormal
Status: newassigned

Selecting items from code is a different issue. Please open a separate ticket for that one if you have more details informations how to reproduce the issue.

comment:2 Changed 3 weeks ago by Thore Böckelmann

Resolution: fixed
Status: assignedclosed

In 6298:

  • List.c: keep the list's active item during MUIM_Sort. This closes #384.
Note: See TracTickets for help on using tickets.