svn commit: r16431 - trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java

Tom Morris <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-12-23 11:18:11-0800
New Revision: 16431

Modified:
   trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java

Log:
Add per-diagram defaults for settings


Modified: trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java?view=diff&pathrev=16431&r1=16430&r2=16431
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/persistence/PGMLStackParser.java	2008-12-23 11:18:11-0800
@@ -44,6 +44,7 @@
 import org.argouml.uml.diagram.PathContainer;
 import org.argouml.uml.diagram.StereotypeContainer;
 import org.argouml.uml.diagram.VisibilityContainer;
+import org.argouml.uml.diagram.ui.ArgoFig;
 import org.argouml.uml.diagram.ui.FigEdgeModelElement;
 import org.argouml.uml.diagram.ui.FigEdgePort;
 import org.tigris.gef.base.Diagram;
@@ -135,7 +136,9 @@
             DiagramSettings defaultSettings) {
         // TODO: Move addTranslation here when deprecated constructor is removed
         this(modelElementsByUuid);
-        diagramSettings = defaultSettings;
+        // Create a new diagram wide settings block which is backed by 
+        // the project-wide defaults that we were passed
+        diagramSettings = new DiagramSettings(defaultSettings);
     }
 
     /*
@@ -241,6 +244,7 @@
                 throw new SAXException("Found href of " + href
 				       + " with no matching element in model");
             }
+            // The owner should always have already been set in the constructor
             if (f.getOwner() != modelElement) {
                 // Assign nodes immediately but edges later. See issue 4310.
                 if (f instanceof FigEdge) {
@@ -683,7 +687,7 @@
     @Override
     public void setDiagram(Diagram diagram) {
         // TODO: We could generalize this to initialize more stuff if needed
-        ((ArgoDiagram) diagram).setDiagramSettings(diagramSettings);
+        ((ArgoDiagram) diagram).setDiagramSettings(getDiagramSettings());
         super.setDiagram(diagram);
     }

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

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.