Opened 19 years ago
Closed 19 years ago
Last modified 19 years ago
#1803 closed defect (fixed)
Configuring number of channels causes channel names to be missaligned with program information.
Reported by: | anonymous | Owned by: | Isaac Richards |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | 0.19 |
Severity: | medium | Keywords: | |
Cc: | dscoular@… | Ticket locked: | no |
Description
If I change the configuration of the guide to show six channels rather than the default five, the channel names/icons no longer line up with the program information. See attached screenshots for before and after.
Attachments (4)
Change History (11)
Changed 19 years ago by
Attachment: | Screenshot-mythfrontend-broken.jpg added |
---|
Changed 19 years ago by
Attachment: | Screenshot-mythfrontend-ok.jpg added |
---|
Screenshot of program guide with missaligned channels/programs
comment:1 Changed 19 years ago by
This may be an off-by-one error : my configuration actually has SIX channels configured.
http://svn.mythtv.org/trac/browser/trunk/mythtv/libs/libmythtv/guidegrid.cpp#L247 247 maxchannel = max((int)m_channelInfos.size() - 1, 0); 248 setStartChannel((int)(m_currentStartChannel) - 249 (int)(desiredDisplayChans / 2)); 250 if (DISPLAY_CHANS > maxchannel) 251 DISPLAY_CHANS = maxchannel
maxchannel look like a zero-based index, and DISPLAY_CHANS is a one-based number. Surely the "if" clause is off-by-one?
comment:2 Changed 19 years ago by
(Repost of previous comment with proper formatting. Sorry)
This may be an off-by-one error : my configuration actually has SIX channels configured.
http://svn.mythtv.org/trac/browser/trunk/mythtv/libs/libmythtv/guidegrid.cpp
247 maxchannel = max((int)m_channelInfos.size() - 1, 0); 248 setStartChannel((int)(m_currentStartChannel) - 249 (int)(desiredDisplayChans / 2)); 250 if (DISPLAY_CHANS > maxchannel) 251 DISPLAY_CHANS = maxchannel;
maxchannel look like a zero-based index, and DISPLAY_CHANS is a one-based number. Surely the "if" clause is off-by-one?
comment:3 Changed 19 years ago by
Cc: | dscoular@… added |
---|
Hi Llyric, I've verified that this is a bug. I modified line 251 from:
if (DISPLAY_CHANS > maxchannel) DISPLAY_CHANS = maxchannel;
to:
if (DISPLAY_CHANS > maxchannel + 1) // DUG FIXME DISPLAY_CHANS = maxchannel;
And it fixes the issue for me. However, there a number of these exact same if statements through this file and I suspect they should all be changed to the above.
Cheers,
Doug
Changed 19 years ago by
Attachment: | good.patch added |
---|
comment:4 Changed 19 years ago by
Previous attachment is by dscoular@…, and is against 0.19-fixes svn revision 9953.
I am unable to verify this myself right now, as I have other unrelated issues with myth-svn. Will apply this patch to my 0.19 build tonight, and see how it goes.
comment:5 Changed 19 years ago by
Yup, good.patch appears to fix the problem for me, see following screenshot.
Changed 19 years ago by
Attachment: | Screenshot-mythfrontend.jpg added |
---|
Screenshot of guide after applying good.patch
Screenshot of program guide with missaligned channels/programs