What can be done about bug #621476 (Graph scroll bars fail with many tags)?

"zen_atheist" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.gui.devel
Message-ID <[email protected]>
Hi,

I recently spent some time to figure out what is causing this bug, as
I run into it daily (we have files with hundreds of revisions and
thousands of tags).

(For more info, see sourceforge bug tracking system, id 621476:
http://sourceforge.net/tracker/index.php?func=detail&aid=621476&group_id=10072&atid=110072)

It turns out to be caused by an MFC bug. The absolute offset in the
graph view to the visible window is passed through the MFC window
message handler packed in a WORD, but then sign-extended to signed
int. This means that when the offset passes 0x7FFF, it 'becomes' a
negative number, and when it passes 0xFFFF, it will wrap around to zero.

Unfortunately, when dealing with such large windows, the default
page/line scroll amounts are so large (size/10, size/100 respectively)
that it become impossible to see all revisions (because the window
scrolls by so much even when pressing the down arrow).

I have come up with a *very* poor workaround, that effictively clips
the line scroll sizes to 100 pixels. The code is provided below, but
it is very certainly not a good way to fix this problem.

However, not being an MFC programmer myself, I can think of no better
way. Does anybody have any better ideas?


myles.



Workaround: (please ignore silly text wrapping)

Change line 1170-1171 in GraphView.cpp from:

// Set the scroll size, we add the margin of the start point offset on
each side
SetScrollSizes(MM_TEXT, bounds.Size() +
CSize(startPoint)+CSize(startPoint)+CSize(SHADOW_OFFSET_PT));

to:

// get total size
CSize totalSize = bounds.Size() +
CSize(startPoint)+CSize(startPoint)+CSize(SHADOW_OFFSET_PT);

// Set the scroll size, we add the margin of the start point offset on
each side
SetScrollSizes(MM_TEXT, totalSize, sizeDefault, ((totalSize.cy/100) >
100) ? sizeDefault : CSize(0,100) );



To unsubscribe from this group, send an email to:
[email protected]

 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/NhFolB/TM
---------------------------------------------------------------------~->

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/cvsgui-dev/

To unsubscribe from this group, send an email to:
 [email protected]

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.