Login | Register
My pages Projects Community openCollabNet

Discussions > dev > [gef-dev] Scaling problems > Reply to message

gef
Reply to message

* = Required fields
* Subject
* Body
Attachments
Send reply to
Topic
Author (directly in email)
Please type the letters in the image above.

Original message

Author Bob Tarling <bob.tarling@ntlworld.com>
Full name Bob Tarling <bob.tarling@ntlworld.com>
Date 2004-01-29 18:06:21 PST
Message I have to confess I'm getting beaten by issue 60 http://gef.tigris.or​g/issues/show_bug.cg​i?id=60

If anyone can spot anything I'm missing then let me know.

I think part of the problem lies with the methods on Editor of translateMouseEvent and retranslateMouseEvent. These are called by various modes, which means that no other mode can be sure if the mouse event it is passed has already been scaled or not.

I'd suggest these methods should return a new copy of a MouseEvent rather than amending its input, that's a nasty side effect.

Better still we could subclass MouseEvent to contain both scaled and unscaled co-ordinates and pass this specialist MouseEvent around instead.

In the meantime though I'd like to find a workaround for the current problem. This is around the mouseDragged method of ModeSelect, I've done some refactoring so I can see what's going on a bit more clearly but I've had no luck so far in solving this.

Those using ArgoUML can easily reproduce the bug with that, just zoom in or out and then draw a selection rectangle. I'll but a demo into BasicApplication also.

Bob.