From 93ec1a9df295d4b7891b4a1f9e51f603e98975c1 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Tue, 3 Feb 2015 10:52:33 +0100 Subject: Fixed switching channels in the Schedule menu after going through various Now and Schedule menus for different channels --- menu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'menu.c') diff --git a/menu.c b/menu.c index 2d6916ed..ab778e45 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 3.36 2015/02/02 12:23:18 kls Exp $ + * $Id: menu.c 3.37 2015/02/03 10:42:55 kls Exp $ */ #include "menu.h" @@ -1748,9 +1748,12 @@ eOSState cMenuSchedule::Record(void) eOSState cMenuSchedule::Switch(void) { - if (otherChannel) { - if (Channels.SwitchTo(otherChannel)) - return osEnd; + cMenuScheduleItem *item = (cMenuScheduleItem *)Get(Current()); + if (item) { + if (cChannel *Channel = Channels.GetByChannelID(item->event->ChannelID(), true)) { + if (Channels.SwitchTo(Channel->Number())) + return osEnd; + } } Skins.Message(mtError, tr("Can't switch channel!")); return osContinue; -- cgit v1.2.3