Re: [patch] complete fix for #302


Subject: Re: [patch] complete fix for #302
From: Aaron Lehmann (aaronl@vitelus.com)
Date: Tue Mar 07 2000 - 20:59:34 CST


On Tue, 7 Mar 2000, Paul Rohr wrote:

> At 01:49 AM 3/3/00 +0000, Aaron Lehmann wrote:
> >I've fixed up the problems that I have discovered in the way I tried to
> >fix this bug and also those that others have helpfully pointed out. Now it
> >seems to "just work".
>
> Aaron, it looks like you're getting very close here. The guide lines seem
> to be XORing properly now. However, before we can close this bug, I think
> you'll probably need to make better use of _snapPixelToGrid() in your m_oldX
> calculations.

Makes sense. I had not taken grid snapping into account, thanks for
reminding me that this is necessary. Fixed in supplied patch.

> 1. Open an empty new document.
> 2. Drag any of the left margin controls off and back on.
> 3. Unless you release your mouse at the *exact* same X coordinate you
> started at, it still sets the undo state for another change (as shown on
> the ruler). That's too much precision for most mouse-wielders. ;-)
>
> Also, it looks like there may be a different problem with tabs.
>
> 1. Open an empty new document.
> 2. Add a tab at, say, 1". (This should be undo step #1.)
> 3. Drag that tab to 2". (This should be undo step #2.)
> 4. Hit undo once. The tab should be back at 1", but it's gone.

I spent a few hours tracking down this one - it really stumped me. I
figured it out though and fixed it. Thank you for pointing it out. I am
very impressed with the quality that AbiSource is able to maintain even in
their CVS version, and extensive testing is the way to do this.

(The bug turned out to be that the m_oldX was being set correctly for new
tabs and when the mouse was released mouseRelease() thought they had not
moved at all (which would be the case if you just clicked to create a
tab) so did not do the necessary operation to establish them permenantly.)

I compiled the enclosed patch using -pedantic and tested it extensively.
You'll still probably find a way to break it though ;-). Have fun.
I'm hoping to finally close this bug soon :).

Aaron Lehmann




This archive was generated by hypermail 2b25 : Tue Mar 07 2000 - 20:59:42 CST