svn commit: r16521 - trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigStubState.java

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-01-05 10:08:00-0800
New Revision: 16521

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigStubState.java

Log:
Issue 5584: We're our listener to the owner here. Lets not remove it unless the owner changes (which should never happen in theory anyway)

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigStubState.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigStubState.java?view=diff&pathrev=16521&r1=16520&r2=16521
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigStubState.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigStubState.java	2009-01-05 10:08:00-0800
@@ -364,7 +364,7 @@
         try {
             text = facade.getReferenceState(getOwner());
         } catch (Exception e) {
-            LOG.error(e);
+            LOG.error("Exception caught and ignored!!", e);
         }
         if (text != null) {
             referenceFig.setText((String) text);
@@ -461,10 +461,11 @@
 
     @Override
     protected void updateListeners(Object oldV, Object newOwner) {
-        Object container = null;
         if (oldV != null) {
-            removeElementListener(oldV);
-            container = facade.getContainer(oldV);
+            if (oldV != newOwner) {
+                removeElementListener(oldV);
+            }
+            Object container = facade.getContainer(oldV);
             while (container != null && !facade.isTop(container)) {
                 removeElementListener(container);
                 container = facade.getContainer(container);

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

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.