Index: GuideBase.cs =================================================================== --- GuideBase.cs (revision 28264) +++ GuideBase.cs (working copy) @@ -52,6 +52,7 @@ protected int _timePerBlock = 30; // steps of 30 minutes protected bool _singleChannelView = false; protected int _channelCount = 5; + protected int _lastChannelCount = 0; protected List _channelList = new List(); protected int _singleChannelNumber = 0; protected int _cursorY = 0; @@ -160,6 +161,7 @@ img.Height = cntlHeaderBkgImg.RenderHeight; img.SetFileName(cntlHeaderBkgImg.FileName); img.SetPosition(xpos, ypos); + img.DoUpdate(); GUILabelControl label = GetControl((int)Controls.LABEL_TIME1 + iLabel) as GUILabelControl; @@ -189,15 +191,25 @@ } // add channels... - int iItemHeight = cntlChannelTemplate.Height; + + int iItemHeight = cntlChannelTemplate.Height; UpdateChannelCount(); + if (_channelCount < _lastChannelCount) + { + for (int iChan = 0; iChan < _lastChannelCount; ++iChan) + { + this.Remove((int)Controls.IMG_CHAN1 + iChan); + } + } + + for (int iChan = 0; iChan < _channelCount; ++iChan) { xpos = cntlChannelTemplate.XPosition; ypos = cntlChannelTemplate.YPosition + iChan * iItemHeight; - //this.Remove((int)Controls.IMG_CHAN1+iChan); + GUIButton3PartControl imgBut = GetControl((int)Controls.IMG_CHAN1 + iChan) as GUIButton3PartControl; if (imgBut == null) { @@ -511,7 +523,8 @@ protected abstract string SkinPropertyPrefix { get; } protected void UpdateChannelCount() - { + { + _lastChannelCount = _channelCount; GetChannels(false); GUIControl cntlPanel = GetControl((int)Controls.PANEL_BACKGROUND); GUIImage cntlChannelTemplate = (GUIImage)GetControl((int)Controls.CHANNEL_TEMPLATE); @@ -524,6 +537,7 @@ { _channelCount = _channelList.Count(); } + } } }