Author: tfmorris
Date: 2008-03-25 10:50:06-0700
New Revision: 14227

Modified:
   trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java

Log:
Add comment about suspect behavior

Modified: trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java
Url: 
http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java?view=diff&rev=14227&p1=trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java&p2=trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java&r1=14226&r2=14227
==============================================================================
--- trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java        
(original)
+++ trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java        
2008-03-25 10:50:06-0700
@@ -185,11 +185,10 @@
         if (target != null) {
             target.removePropertyChangeListener("remove", this);
         }
-        
         newTarget.addPropertyChangeListener("remove", this);
 
         setToolBar(newTarget.getJToolBar());
-
+        
         // NOTE: This listener needs to always be active 
         // even if this tab isn't visible
         graph.removeGraphSelectionListener(this);
@@ -271,7 +270,7 @@
              * != null && !Globals.clipBoard.isEmpty());
              */
             // the old selection
-            Collection currentSelection =
+            List currentSelection =
                 TargetManager.getInstance().getTargets();
 
             List removedTargets = new ArrayList(currentSelection);
@@ -290,8 +289,8 @@
                 // Optimize for the normal case to minimize target changes
                 TargetManager.getInstance().setTarget(addedTargets.get(0));
             } else {
-                for (Object o : removedTargets) {
-                    TargetManager.getInstance().removeTarget(o);
+            for (Object o : removedTargets) {
+                TargetManager.getInstance().removeTarget(o);
                 }
                 for (Object o : addedTargets) {
                     TargetManager.getInstance().addTarget(o);
@@ -397,6 +396,8 @@
             }
         }
 
+        // This checks the order in addition to the contents
+        // Is that really what we want here? - tfm 20070603
        if (!figList.equals(graph.selectedFigs())) {
             graph.deselectAll();
             graph.select(new Vector<Fig>(figList));

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to