Bug 310125 - UML diagram role labels have wrong location
Summary: UML diagram role labels have wrong location
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL: https://bazaar.launchpad.net/~avaneya...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-15 00:42 UTC by Kip
Modified: 2013-11-02 17:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.0


Attachments
Audio UML diagram (301.52 KB, image/svg+xml)
2012-11-15 01:13 UTC, Kip
Details
Audio diagram after Ralph's patch (333.98 KB, image/svg+xml)
2012-11-16 23:47 UTC, Kip
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kip 2012-11-15 00:42:31 UTC
If you take a look at my project fle, specifically the Audio diagram, the UML role labels seem to have the wrong location. If I try and correct them by dragging them back, they snap somewhere else. Regardless, when I save and open the project up again, everything is a mess again.

Here is my project file which exhibits this problem: 
<https://bazaar.launchpad.net/~avaneya/avaneya/trunk/view/head:/Documentation/Contributors/AresEngine/UML/Engine.xmi> 

I hope that is helpful. 

Reproducible: Always

Steps to Reproduce:
$ umbrello --export svg Engine.xmi --directory Output
Comment 1 Kip 2012-11-15 01:13:48 UTC
Created attachment 75274 [details]
Audio UML diagram
Comment 2 Ralf Habacker 2012-11-16 16:40:16 UTC
I guess this screenshot shows a different problem. You are refering to the right of the widget, where the lines are not ended on the widgets outline ?
Comment 3 Ralf Habacker 2012-11-16 16:54:57 UTC
(In reply to comment #0)
> If you take a look at my project fle, specifically the Audio diagram, the
> UML role labels seem to have the wrong location. If I try and correct them
> by dragging them back, they snap somewhere else. 
 
The problem is that labels are wrapped to a hard coded scene size (3000x3000 in class FloatingTextWidget), which the related labels exceeds. In this case the label position part exceeding this limit (x or y or both) is reset to zero. 

>Regardless, when I save and open the project up again, everything is a mess again.
Your diagram size is about 5000x5000 scene units, which results into rewrapping labels exceeding 3000/3000 on every load. 
A fix will be to set the limit from the recent scene size.
Comment 4 Ralf Habacker 2012-11-16 17:01:27 UTC
SVN commit 1325272 by habacker:

Bug fix - use scene size for wrapping text labels exceeding the scene bounding rect.


 M  +2 -2      umlscene.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1325272
Comment 5 Kip 2012-11-16 23:39:44 UTC
(In reply to comment #2)
> I guess this screenshot shows a different problem. You are refering to the
> right of the widget, where the lines are not ended on the widgets outline ?

Hey Ralph. Actually that's a problem too, but I didn't notice that until you pointed it out.
Comment 6 Kip 2012-11-16 23:47:50 UTC
Created attachment 75304 [details]
Audio diagram after Ralph's patch
Comment 7 Kip 2012-11-16 23:48:00 UTC
It looks better, but there are still some anomalies. I will upload what the audio diagram looks like with your most recent patch. Note down at the bottom, third box from the right, Ares::SDLAudioDecoder's orphin floating "-m_DataStreamPtr".
Comment 8 Ralf Habacker 2012-11-17 11:00:25 UTC
(In reply to comment #7)
> It looks better, but there are still some anomalies. I will upload what the
> audio diagram looks like with your most recent patch. Note down at the
> bottom, third box from the right, Ares::SDLAudioDecoder's orphin floating
> "-m_DataStreamPtr".

You can move the label to a better location and it will stay there after xmi file save and reload, right ? It looks like that the given position is the default snap position
Comment 9 Ralf Habacker 2012-11-17 11:06:12 UTC
(In reply to comment #8)
> You can move the label to a better location and it will stay there after xmi
> file save and reload, right ? It looks like that the given position is the
> default snap position

Tried just to move widgets in the diagram: Some labels are not following the widget movement  - can you confirm this behavior ?
Comment 10 Kip 2012-11-18 00:18:21 UTC
Hey Ralph. I can confirm that some of the labels do not follow the widgets. When I move Ares::StaticAudioBuffer, the labels to its right do not move with it.