[Uml-devel] Question on AssociationWidget::loadFromXMI() - why unset old-first position of linepath
Achim Spangler
Achim.Spangler at mnet-online.de
Mon Apr 19 00:53:11 UTC 2004
Hi,
umbrello moves very often the FloatingText widgets of associations during
project file load. I detected during my research, the following comment in
associationwidget.cpp in line 3.153
------------
else {
// set up 'old' corner from first point in line
// as IF this ISNT done, then the subsequent call to
// widgetMoved will inadvertantly think we have made a
// big move in the position of the association when we haven't.
QPoint p = m_LinePath.getPoint(0);
m_role[A].m_OldCorner.setX(p.x());
m_role[A].m_OldCorner.setY(p.y());
}
----------------
First - I don't find a call to a function for move of widget -> is this
indirect called or is this call removed in current version?
Second - I think this move upon load is not good:
+ reload everything in same place as on last save is what the user
( at least me ) awaits
+ repositioning of single associations and single FloatingTexts can
lead to wrong results, if not all associations of the affected diagram
are reloaded
##
I suggest to inhibit the call to UMLWidget::adjustAssocs() during load of XMI
project should be inhibited. Simply place everything on last position before
save of xmi - in file umlwidget.cpp.
##
The reason for my research on ways to inhibit movements on reload:
The FloatingText widgets are moved too often on reload.
Additionally, I had some very irritating movements in diagrams, which I didn't
edit for a long time ( i.e. a lot of save-reload cycles ), where all widgets
were moved for a very long distance. Only the manual placed line-points stay
at the old position.
Bye,
Achim
Btw.:
Is there a possibility to comment all changes with:
+ date
+ author
+ reason for change
direct in the source file.
More information about the umbrello-devel
mailing list