Opened 11 years ago

Closed 11 years ago

#5883 closed defect (fixed)

Error in MythUIButtonList::RemoveItem() logic

Reported by: Marc Alban <marcalban@…> Owned by: Isaac Richards
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Removing the top item from a mythui button list results in the list scrolling up one space to far.

When removing an item from the top of a list, the m_topPosition variable should not be incremented.

Consider the case where the top item is at index 0. If it is removed all of the items below it will be shifted up, so the new m_topPosition should still be 0, not 1.

A similar argument is true for m_selPosition when removing an item that is currently selected.

Attachments (1)

removeItem.patch (814 bytes) - added by Marc Alban <marcalban@…> 11 years ago.
fix for scroll bug

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by Marc Alban <marcalban@…>

Attachment: removeItem.patch added

fix for scroll bug

comment:1 Changed 11 years ago by stuartm

Resolution: fixed
Status: newclosed

(In [18978]) Fix the behaviour of RemoveItem?() when selecting the new position in the list. Thanks to Marc Alban for the patch. Closes #5883

Note: See TracTickets for help on using tickets.