[Uml-devel] Real Fix of UMLWidget::adjustAssocs() and Repair of MessageWidget load
Achim Spangler
Achim.Spangler at mnet-online.de
Wed Jul 21 07:17:06 UTC 2004
Hi,
the XMI load of message widgets is currently quite broken in CVS.
The reason was a wrong logical combination in UMLView:
WAS:
- if(!m_pDoc->loading() && !obj->activate(m_pDoc->getChangeLog())) {
SHOULD BE:
+ if(!m_pDoc->loading() || !obj->activate(m_pDoc->getChangeLog())) {
==>
The MessageWidget activation call was never performed during load of XMI.
==>
The lifeline of the objects weren't adopted to the message widget position AND
by the missing signal connection, each TRY to move a loaded message widget
caused a flip to the left margin of the QCanvas.
As the debug message of UMLWidget::adjustAssocs() was then activa again, I
used the KDebug function: KGlobal::kdBacktrace () from kdebug.h to get the
call stack for this unwanted call.
==>
The activate() method of MessageWidget called calculateDimensions(), which
then causes the call of UMLWidget::adjustAssocs(). As this calculation is
only needed for a new MessageWidget - and not during load - this call should
be made dependend on NotLoadingState.
With the attached diff, this call is performed only for new instances.
So please apply the attached patch, to get working MessageWidgets back.
##
Hmmh - I think we need some way of automatic test suites, so that it gets
easier to avoid such bugs. As this bug inhibited for me any correct reload of
a MessageWidget in a sequence diagram, we should try to avoid such problems.
Bye,
Achim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RepairMessageWidgetLoad.diff
Type: text/x-diff
Size: 2646 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20040721/c72efded/attachment.bin>
More information about the umbrello-devel
mailing list