Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#320 closed bug (fixed)

Setting MUIA_Cycle_Entries should cause a refresh

Reported by: Andreas Falkenhahn Owned by: Thore Böckelmann
Priority: normal Milestone: 5.0-2016R3
Component: Cycle.mui Version: 5.0-2016R2
Severity: minor Keywords:
Cc: OS Platform: All
Blocked By: Blocking:
Release Notes:


I've noticed that when setting MUIA_Cycle_Entries without changing the number of entries, MUI doesn't redraw the cycle gadget. This should be changed because currently, there's no clean way to simply change the label of an item because the cycle gadget doesn't refresh itself automatically after setting MUIA_Cycle_Entries. The only way to cause a refresh is to set MUIA_Cycle_Active to a new position and then revert to the old position. This will force MUI to redraw and then the new item label is shown correctly but of course this isn't such a nice solution….

Change History (7)

comment:1 Changed 4 years ago by Andreas Falkenhahn

UPDATE: Actually, it does seem to redraw after setting MUIA_Cycle_Entries but it doesn't show the active item.

Example: If MUIA_Cycle_Entries is set when the 10th item is active, MUI will redraw the cycle gadget *but* it will now show the *first* item as the active one. MUIA_Cycle_Active, however, still returns 9. This is definitely a bug. MUI redraws the gadget after setting MUIA_Cycle_Entries but it always shows the first item as the active one…

So the bug seems to be that MUIA_Cycle_Active isn't internally reset to 0 after setting MUIA_Cycle_Entries. It still seems to keep its old value.

comment:2 Changed 4 years ago by Thore Böckelmann

Milestone: future release5.0-2016R3
Owner: set to Thore Böckelmann
Priority: undecidednormal
Status: newassigned

comment:3 Changed 4 years ago by Thore Böckelmann

You are right. The current behaviour is both inconsistent and wrong.

comment:4 Changed 4 years ago by Thore Böckelmann

Resolution: fixed
Status: assignedclosed

In 5557:

  • Cycle.c, Text.c: setting MUIA_Cycle_Entries now correctly refreshes the cycle object while either keeping the current item active or displaying the new item restricted to the number of items. This closes #320.

comment:5 Changed 4 years ago by Thore Böckelmann

In 5561:

  • Cycle.c, Text.c: do a relayout in case the Cycle object's entries array is changed. This refs #320.

comment:6 Changed 4 years ago by Thore Böckelmann

In 5562:

  • Cycle.c: trigger a notification if setting MUIA_Cycle_Entries caused an adjustment of the active entry. This refs #320.

comment:7 Changed 4 years ago by Andreas Falkenhahn

Thanks, I've tried the nightly build from November 16th and everything is working correctly now.

Note: See TracTickets for help on using tickets.