Project

General

Profile

Actions

Bug #3988

closed

Rectangle shifts position on resize

Added by Oliver Soong about 15 years ago. Updated almost 15 years ago.

Status:
Resolved
Priority:
Low
Category:
actors
Target version:
Start date:
04/17/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3988

Description

If I create a rectangle (components->workflow->workflow documentation) and resize it, the entire rectangle shifts slightly up and left.

Actions #1

Updated by Christopher Brooks about 15 years ago

This bug: "create a rectangle (components->workflow->workflow documentation) and
resize it," is also present in Ptolemy, but is not present in the Diva
tutorial in ptII/diva/canvas/tutorial.
I suspect that the problem is the snap to grid, but I did not stumble across
a way to disable snap to grid and change the behavior of this bug.

Actions #2

Updated by Christopher Brooks almost 15 years ago

I might have this one fixed, Edward may have some comments.

It turns out that RectangleAttribute and ResizablePolygonAttribute had
the same bug: creating one of them and then resizing would cause the figure
to jump up and to the left. With ResizablePolygonAttribute, this was
especially obvious. However, EllipseAttribute did not have the problem.
EllipseAttribute was setting the centered Parameter to true. When I
made this change to RectangleAttribute and ResizablePolygonAttribute, the
problem went away.

I looked at a few demos and icons, and this change did not appear to cause
problems. I'm not sure why.

I'm leaving this open pending review to see if the change causes problems.

Actions #3

Updated by Christopher Brooks almost 15 years ago

I'm closing this, my solution was to modify the configuration
so that new RectangleAttributes are created with centered set
to true, which means that new RectangleAttributes will not have
this bug, but old ones will jump around slightly. The alternative
would be to change the ctor to set centered to always be true,
which breaks existing models. A complete fix would be to fix
the old models as well, but I believe this to be very difficult
and not worth the engineering time. It is somewhat questionable
as to whether this bug should be closed, but my fix solves the
test case :-^. A new bug could be opened to fix the jump in
existing RectangleAttributes . . .

Actions #4

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 3988

Actions

Also available in: Atom PDF