Bug 310125

Summary: UML diagram role labels have wrong location
Product: umbrello Reporter: Kip <kip>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal CC: ralf.habacker, ralf.habacker
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
URL: https://bazaar.launchpad.net/~avaneya/avaneya/trunk/view/head:/Documentation/Contributors/AresEngine/UML/Engine.xmi
Latest Commit: Version Fixed In: 4.10.0
Attachments: Audio UML diagram
Audio diagram after Ralph's patch

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.