Don,
I have been having getting StackOverflow exceptions within the
OffsetGrabPoint class under certain circumstances when bringing graphics
(typically polygons created from shape files) into the drawing tool.
It was working fine in the 20031029 snapshot but I was having the problem
with the 20040107 snapshot.
Doing a diff on the OffsetGrabPoint class showed additions to the update()
and move() functions. Commenting out these additions fixes the StackOverflow
issues. Are these additions needed?
Thanks,
Brian Hudson
(Commented sections reflect additions since the 20031029 snapshot)
/**
* Update resets the pixel offsets from the OffsetGrabPoint,
* to the current distances between the GrabPoint and the
* OffsetGrabPoint.
*/
public void update() {
offsetX = gp.getX() - getX();
offsetY = gp.getY() - getY();
//if (gp instanceof OffsetGrabPoint) {
// ((OffsetGrabPoint)gp).updateOffsets();
//}
}
/**
* Move relocates the GrabPoint to the current position of the
* OffsetGrabPoint plus the offset distances.
*/
public void move() {
int newX = getX() + offsetX;
int newY = getY() + offsetY;
if (gp instanceof HorizontalGrabPoint) {
((HorizontalGrabPoint)gp).set(newX, newY, true);
} else if (gp instanceof VerticalGrabPoint) {
((VerticalGrabPoint)gp).set(newX, newY, true);
} else {
gp.set(newX, newY);
}
//if (Debug.debugging("eomg")) {
//Debug.output("OffsetGrabPoint.offset moving GB to " +
// newX + ", " + newY);
//}
// if (gp instanceof OffsetGrabPoint) {
// ((OffsetGrabPoint)gp).moveOffsets();
// }
}
}
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Tue Jan 27 16:58:47 2004
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:37 EDT