diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2003-08-09 10:19:33 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2003-08-09 10:19:33 +0200 |
commit | d369eb9408763557f378498734b7c3cc234f895d (patch) | |
tree | 96728ef2a129a35873de8d718ae75fd0491d5e8e /menu.c | |
parent | b9a8abbe93f1cc404dc415785bf7a2743111bbab (diff) | |
download | vdr-d369eb9408763557f378498734b7c3cc234f895d.tar.gz vdr-d369eb9408763557f378498734b7c3cc234f895d.tar.bz2 |
Fixed keeping track of the current channel number when moving channels in the "Channels" menu
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.264 2003/08/03 09:38:37 kls Exp $ + * $Id: menu.c 1.265 2003/08/09 10:14:44 kls Exp $ */ #include "menu.h" @@ -763,6 +763,8 @@ eOSState cMenuChannels::Delete(void) void cMenuChannels::Move(int From, int To) { + int CurrentChannelNr = cDevice::CurrentChannel(); + cChannel *CurrentChannel = Channels.GetByNumber(CurrentChannelNr); cChannel *FromChannel = GetChannel(From); cChannel *ToChannel = GetChannel(To); if (FromChannel && ToChannel) { @@ -772,6 +774,8 @@ void cMenuChannels::Move(int From, int To) cOsdMenu::Move(From, To); Propagate(); isyslog("channel %d moved to %d", FromNumber, ToNumber); + if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr) + Channels.SwitchTo(CurrentChannel->Number()); } } |