svn commit: r13349 - trunk/src_new/org/argouml/ui/cmd/CmdSetPreferredSize.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2007-08-14 12:50:07-0700
New Revision: 13349

Modified:
   trunk/src_new/org/argouml/ui/cmd/CmdSetPreferredSize.java

Log:
Fix exception in "Size to Fit Contents" for an edge.

Modified: trunk/src_new/org/argouml/ui/cmd/CmdSetPreferredSize.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/ui/cmd/CmdSetPreferredSize.java?view=diff&rev=13349&p1=trunk/src_new/org/argouml/ui/cmd/CmdSetPreferredSize.java&p2=trunk/src_new/org/argouml/ui/cmd/CmdSetPreferredSize.java&r1=13348&r2=13349
==============================================================================
--- trunk/src_new/org/argouml/ui/cmd/CmdSetPreferredSize.java	(original)
+++ trunk/src_new/org/argouml/ui/cmd/CmdSetPreferredSize.java	2007-08-14 12:50:07-0700
@@ -141,7 +141,8 @@
                     /* But exclude elements that enclose others, 
                      * since their algorithms to calculate the minimum size 
                      * does not take enclosed objects into account: */
-                    && (fi.getEnclosedFigs().size() == 0)) {
+                    && (fi.getEnclosedFigs() == null 
+                            || fi.getEnclosedFigs().size() == 0)) {
                 if (mode == PREFERRED_SIZE) {
                     fi.setSize(fi.getPreferredSize());
                 } else {
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.