svn commit: r17165 - branches/BRANCH_0_28_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CollaborationsHelperMDRImpl.java

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-07-06 13:09:24-0700
New Revision: 17165

Modified:
   branches/BRANCH_0_28_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CollaborationsHelperMDRImpl.java

Log:
Add to branch the sequence diagram fixes

Modified: branches/BRANCH_0_28_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CollaborationsHelperMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_28_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CollaborationsHelperMDRImpl.java?view=diff&pathrev=17165&r1=17164&r2=17165
==============================================================================
--- branches/BRANCH_0_28_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CollaborationsHelperMDRImpl.java	(original)
+++ branches/BRANCH_0_28_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CollaborationsHelperMDRImpl.java	2009-07-06 13:09:24-0700
@@ -845,7 +845,14 @@
 
     public void addMessage(Object handle, Object elem) {
         if (handle instanceof Interaction && elem instanceof Message) {
-            ((Interaction) handle).getMessage().add((Message) elem);
+            final Message message = (Message) elem;
+            final Interaction interaction = (Interaction) handle;
+            final Interaction oldInteraction = message.getInteraction();
+            
+            if (oldInteraction != null) {
+                oldInteraction.getMessage().remove(message);
+            }
+            interaction.getMessage().add(message);
             return;
         }
         if (handle instanceof AssociationRole && elem instanceof Message) {

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2368518

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.