[umbrello] [Bug 449622] fit to screen after loading file

Oliver Kellogg bugzilla_noreply at kde.org
Thu Feb 10 15:14:58 GMT 2022


https://bugs.kde.org/show_bug.cgi?id=449622

Oliver Kellogg <okellogg at users.sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |okellogg at users.sourceforge.
                   |                            |net

--- Comment #3 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
It looks as though version 2.32 may produce some weird diagram coordinate
values.
First line in <diagram>:

<diagram showopsig="1" [...] canvasheight="4.29497e+09"
canvaswidth="4.29487e+09" 

The canvasheight and canvaswidth values are unusable.
By fortunate chance, the diagram loadFromXMI function happens to ignores these
attributes.

However, there are also huge offsets on the x/y coordinates in the diagram 
elements.
First <classwidget> in <diagram>:
<classwidget linecolor="#ff0000" [...] x="-95708.9" showattsigs="601"
showstereotype="1" y="-36843.3" 

Looking at the x / y values of the further widgets, they all have a huge offset
factor.

For the load code this would mean there would need to be an extra first pass
which determines the minimum of all x and the minimum of all y values, and in
the actual loading pass the minX / minY would need to be subtracted from the x
/ y values.
I'm not sure if and when I get around to implementing that - but there is a
fairly simple workaround:
Select the arrow tool and draw a rectangle around the objects (group
selection). Then move the group to the top left corner of the diagram.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list