- changed status to resolved
ChannelSelection context menu has active shortcuts for menu items that aren't available
ChannelContextMenu
has a fixed ActionMap
for its ChoiceList
, so that shortcut buttons (numbers, colours) are always active, even if there is no menu item corresponding to the shortcut's action.
Because menu construction strongly depends on the state of the ChannelSelection
screen, shortcut button presses can activate functions that are not appropriate for the current state, which can cause crashes (example in Replication steps).
Shortcut buttons should only be active on the ChannelContextMenu
if there is a corresponding menu item.
Replication steps
From live TV: FAV
MENU>Enable bouquet edit (or MENU, YELLOW) Enters bouquet edit mode
MENU, GREEN (unlabelled move mode) (inappropriately enters move mode)
MENU>End bouquet edit
MENU>Disable move mode (or MENU, GREEN): Crash.
EXIT instead of MENU>Disable move mode as the last step will also crash.
Comments (1)
-
- Log in to comment
Fix Bug
#580: ChannelSelection context menu has active shortcuts for menu items that aren't availableCreate new _append_when_current_valid() function that creates entries in an actions map for the shortcut buttons to ensure that shortcut buttons are in the self["actions"] ActionMap only if they have a corresponding menu entry.
Modify append_when_current_valid() to call _append_when_current_valid() with actions set to None to emulate original behaviour of the function. Print a deprecation warning.
Use the new _append_when_current_valid() function to ensure that all button shortcuts correspond to a valid menu item. Only unconditionally set shortcut buttons for unconditional menu items.
Change the creation of the "Add marker" menu item from an explicit test on the validity of current to use _append_when_current_valid(), since the test is equivalent in the function and it handles the shortcut on "Add marker".
→ <<cset 2668a5e46b93>>