Ticket #1803: good.patch

File good.patch, 1.2 KB (added by lyricnz@…, 14 years ago)
  • libs/libmythtv/guidegrid.cpp

     
    247247    maxchannel = max((int)m_channelInfos.size() - 1, 0);
    248248    setStartChannel((int)(m_currentStartChannel) -
    249249                    (int)(desiredDisplayChans / 2));
    250     if (DISPLAY_CHANS > maxchannel)
    251         DISPLAY_CHANS = maxchannel;
     250    DISPLAY_CHANS = min(DISPLAY_CHANS, maxchannel+1);
    252251
    253252    //int fillchannels = clock.elapsed();
    254253    //clock.restart();
     
    13051304    DISPLAY_CHANS = desiredDisplayChans;
    13061305    fillChannelInfos();
    13071306    maxchannel = max((int)m_channelInfos.size() - 1, 0);
    1308     if (DISPLAY_CHANS > maxchannel)
    1309         DISPLAY_CHANS = maxchannel;
     1307    DISPLAY_CHANS = min(DISPLAY_CHANS, maxchannel+1);
    13101308
    13111309    m_recList.FromScheduler();
    13121310    fillProgramInfos();
     
    13511349        DISPLAY_CHANS = desiredDisplayChans;
    13521350        fillChannelInfos(false);
    13531351        maxchannel = max((int)m_channelInfos.size() - 1, 0);
    1354         if (DISPLAY_CHANS > maxchannel)
    1355             DISPLAY_CHANS = maxchannel;
     1352        DISPLAY_CHANS = min(DISPLAY_CHANS, maxchannel+1);
    13561353
    13571354        repaint(channelRect, false);
    13581355    }