svn commit: r15947 - branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2008-10-28 13:49:21-0700
New Revision: 15947

Modified:
   branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFigUtil.java
   branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java

Log:
Issue 5460: Make sure annotations are in the same layer as the edge

Modified: branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFigUtil.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFigUtil.java?view=diff&rev=15947&p1=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFigUtil.java&p2=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFigUtil.java&r1=15946&r2=15947
==============================================================================
--- branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFigUtil.java	(original)
+++ branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFigUtil.java	2008-10-28 13:49:21-0700
@@ -67,10 +67,12 @@
             }
             GraphModel gm = layer.getGraphModel();
             if (gm instanceof UMLMutableGraphSupport) {
-                return ((UMLMutableGraphSupport) gm).getProject();
-            } else {
-                return ProjectManager.getManager().getCurrentProject();
+                Project project = ((UMLMutableGraphSupport) gm).getProject();
+                if (project != null) {
+                    return project;
+                }
             }
+            return ProjectManager.getManager().getCurrentProject();
         }
         return null;
     }

Modified: branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java?view=diff&rev=15947&p1=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java&p2=branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java&r1=15946&r2=15947
==============================================================================
--- branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java	(original)
+++ branches/BRANCH_0_26_x/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java	2008-10-28 13:49:21-0700
@@ -977,6 +977,10 @@
     public void setLayer(Layer lay) {
         super.setLayer(lay);
         getFig().setLayer(lay);
+        
+        for (Fig f : (List<Fig>) getPathItemFigs()) {
+            f.setLayer(lay);
+        }        
     }
 
     /*
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.