Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Bug in moving channels (was: Bug in vdr 1.2.2-pre)



Mirko Guenther wrote:
> 
> there is still an other bug.
> when i move a channel in the channelmenu (close the menu)
> 1) and press ok, the epg shows the channelname form the channel, whitch
> are now on the old position.
> 
> 2) and press the up (or down) cursor, vdr switch to the next (or prev)
> channel start from the old position an not from the new.

This should fix it:

--- menu.c      2003/08/03 09:38:37     1.264
+++ menu.c      2003/08/09 10:14:44
@@ -763,6 +763,8 @@
 
 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 @@
      cOsdMenu::Move(From, To);
      Propagate();
      isyslog("channel %d moved to %d", FromNumber, ToNumber);
+     if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr)
+        Channels.SwitchTo(CurrentChannel->Number());
      }
 }


Klaus


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index