[Uml-devel] Bugfix for reload of diagram options _and_ running version for linewidth setting

Achim Spangler Achim.Spangler at mnet-online.de
Thu Apr 8 09:11:01 UTC 2004


Hi,
I found during my implementation of the linewidth setting, that 
UMLDoc::loadDiagramsFromXMI() sets the default values for OptionState _AFTER_ 
the call of UMLView::loadFromXMI(). 
Thereby the load of a diagram works with completely undefined default values 
in OptionState.
--> each setting which isn't set in the XMI file gets undefined values.

This caused umbrello to overwrite diagram specific settings by the default 
settings.

I detected this bug, as umbrello crashed with my implementation of line width 
setting on each load of a large project. This was caused by accidentally 
large ( > 1000 ) line width values
-> this caused some lowlevel Qt errors during the first creation of
     arrows in the canvas

I have seperated the change in a single diff.


################
My first try for setting the line width - as requested by bugzilla.

This implementation allows to set a default line width ( global settings 
dialog, umbrellorc ) and a diagram line width.

It works well with my big project ( 2MByte, VirtRam 123m, ResRam 46m, ShrRam 
68m during running the project ).

I adopted the dialog for the diagram settings. But I'm not familiar with 
Qt-Designer -> please improve the dialog.

I didn't implement a seperate line width for print. If a special diagram is 
such bug, that the printout is scaled to small, the line width for this 
diagram can be changed.

################
Question:
Whats so bad with uni-associations, that causes all these warnings during 
load?

Uni-Associations are fine in UML, if both connected elements can access the 
other side. My project has a lot of classes which can access each other in 
both directions ( via Singleton ).

Please deactivate this warning.

################
Invisible FloatingText instances of associations are very often placed quite 
badly - that means values of <0 and >10000 . I'm not shure if they can still 
cause problems on the Canvas or scaling algorithms.
I shielded all "undefined" co-ordinates based on some personally selected 
constants - attached as a seperate diff.

Please:
Add some smart verification in the positioning of FloatingText. It should deny 
settings which are  more than some - confgurable - space away from the 
bounding box of the corresponding line.

Maybe simply set the invisible FloatingText instances to a constant and 
unmoveable <0/0> Point - or delete them completely from XMI format.

Also empty visible labels could be constantly placed at a default position.

#################
The connection line between a note and an UMLWidget instance was wrongly 
imported by some previous XMI format changes as normal association line with 
two visible "+" at the ends.
The diagram layout of my project is often disturbed by accidentally positioned 
"+" of these note-line-associations. These "+" have very often co-ordinates 
of <0 and >10000 .
This causes then often the accidental move of all diagram elements - only the 
line path points stay fixed in this case.

Freshly generated lines between notes and UMLWidgets are handled correct. So 
this is only a backwards compatibility problem.
-> so I must replace the lines where they disturb the layout

################
I found a small bug in my first and quite simple approach for scaling of 
printout. I fixed this -> see _seperate_ diff in the attachement.


Bye,
Achim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: DiffGroup.tar.bzip2
Type: application/x-bzip2
Size: 8567 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20040408/aefb53af/attachment.bin>


More information about the umbrello-devel mailing list