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

"Oliver Kellogg" <[email protected]>
Newsgroups gmane.linux.umbrello.devel
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=449621

--- Comment #2 from Oliver Kellogg <[email protected]> ---
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.