aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Sommerfeld <kai.sommerfeld@gmx.com>2018-02-25 22:08:01 +0100
committerKai Sommerfeld <kai.sommerfeld@gmx.com>2018-02-25 22:08:01 +0100
commitc8188256dec4067cbd5046cd1483e585b4a19bac (patch)
tree1debf51476b3c5456dbbdf18981af945ae319030
parentb3937f429fb9b3818c43185a5d66247537d4f3d5 (diff)
[PVR] Guide window: Fix 'wrap around'.
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRGuide.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp
index 5e79ad6729..af198f4606 100644
--- a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp
@@ -244,16 +244,18 @@ bool CGUIWindowPVRGuideBase::ShouldNavigateToGridContainer(int iAction)
GetFocusedControlID() == control->GetID())
{
int iNavigationId = control->GetAction(iAction).GetNavigation();
-
- control = epgGridContainer;
- while (control != this) // navigation target could be the grid control or one of its parent controls.
+ if (iNavigationId > 0)
{
- if (iNavigationId == control->GetID())
+ control = epgGridContainer;
+ while (control != this) // navigation target could be the grid control or one of its parent controls.
{
- // channel group selector control's target for the action is the grid control
- return true;
+ if (iNavigationId == control->GetID())
+ {
+ // channel group selector control's target for the action is the grid control
+ return true;
+ }
+ control = control->GetParentControl();
}
- control = control->GetParentControl();
}
}
return false;