Opened 13 years ago
Closed 12 years ago
Last modified 12 years ago
#11285 closed Bug Report - General (fixed)
Removing the last item in a MythUIButtonList doesn't update the display
| Reported by: | Owned by: | jpoet | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.27 |
| Component: | MythTV - User Interface Library | Version: | Master Head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
If you remove items from a buttonlist by calling MythUIButtonList::RemoveItem() everything updates properly up to removing the last item which gets removed but the screen doesn't update to reflect that.
Easiest way to reproduce is in MythMusics playlist editor screen add a few tracks to the playlist and then remove them one by one.
I can work around this for now by calling MythUIButtonList::Reset() instead of RemoveItem() if there is only one item left in the buttonlist but it would be nice to get this fixed. I'm 95% sure this is a regression.
Attachments (1)
Change History (13)
comment:1 by , 13 years ago
comment:2 by , 12 years ago
| Status: | new → accepted |
|---|
comment:3 by , 12 years ago
| Milestone: | unknown → 0.27 |
|---|---|
| Status: | accepted → infoneeded |
Paul I cannot reproduce in current master, I reverted the Reset() line in musiccommon.cpp so that it would only call RemoveItem(). When I removed the last item it disappeared from screen.
Could you check whether this is still a problem for you?
comment:4 by , 12 years ago
| Status: | infoneeded → assigned |
|---|
Still behaves the same here with the Reset() removed the last item remains on screen after being removed from the list.
comment:6 by , 12 years ago
comment:7 by , 12 years ago
My guess is you can't see it because your theme is using a different <arrange> method for the buttons. The fixed arrange method works all the others are broken.
The difference seems to be fixed calls CalculateButtonPositions() which always makes sure any unused buttons are made invisible. The other arrange methods call DistributeButtons() which doesn't always made unused buttons invisible.
by , 12 years ago
| Attachment: | 11285_v1.diff added |
|---|
Proposed patch - if there are no items make all the buttons invisible
comment:8 by , 12 years ago
| Owner: | changed from to |
|---|---|
| Status: | assigned → accepted |
comment:9 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |

Related to #8441?