Permalink
Browse files

CGUIDialogSelect: focus the extra button (if available) when the sele…

…ction list is empty
  • Loading branch information...
1 parent de48dd9 commit f1fb84adfbfdd15ac4148778400b4ab74f0e02ef @Montellese Montellese committed Feb 26, 2014
Showing with 8 additions and 0 deletions.
  1. +8 −0 xbmc/dialogs/GUIDialogSelect.cpp
@@ -132,6 +132,14 @@ bool CGUIDialogSelect::OnMessage(CGUIMessage& message)
break;
case GUI_MSG_SETFOCUS:
{
+ // make sure the additional button is focused in case the list is empty
+ // (otherwise it is impossible to navigate to the additional button)
+ if (m_vecList->IsEmpty() && m_bButtonEnabled &&
+ m_viewControl.HasControl(message.GetControlId()))
+ {
+ SET_CONTROL_FOCUS(CONTROL_BUTTON, 0);
+ return true;
+ }
if (m_viewControl.HasControl(message.GetControlId()) && m_viewControl.GetCurrentControl() != message.GetControlId())
{
m_viewControl.SetFocused();

0 comments on commit f1fb84a

Please sign in to comment.