svn commit: r16447 - trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java
Michiel van der Wulp <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mvw
Date: 2008-12-27 14:26:15-0800
New Revision: 16447
Modified:
trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java
Log:
This should fix the failing test.
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java?view=diff&pathrev=16447&r1=16446&r2=16447
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java 2008-12-27 14:26:15-0800
@@ -139,12 +139,28 @@
super.setLayer(lay);
/* This presumes that the layer is set after the owner: */
- assert getOwner() != null;
+ if (getOwner() != null) {
+ initPorts();
+ }
+ }
+
+ @Deprecated
+ @SuppressWarnings("deprecation")
+ @Override
+ public void setOwner(Object owner) {
+ super.setOwner(owner);
+
+ /* This presumes that the owner is set after the layer: */
+ if (getLayer() != null) {
+ initPorts();
+ }
+ }
+ private void initPorts() {
Object sourceSV = Model.getFacade().getSource(getOwner());
Object destSV = Model.getFacade().getTarget(getOwner());
- FigNode sourceFN = (FigNode) lay.presentationFor(sourceSV);
- FigNode destFN = (FigNode) lay.presentationFor(destSV);
+ FigNode sourceFN = (FigNode) getLayer().presentationFor(sourceSV);
+ FigNode destFN = (FigNode) getLayer().presentationFor(destSV);
setSourcePortFig(sourceFN);
setSourceFigNode(sourceFN);
setDestPortFig(destFN);
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=993945
To unsubscribe from this discussion, e-mail: [[email protected]].