svn commit: r18705 - trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2010-08-30 05:48:20-0700
New Revision: 18705

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java

Log:
Issue 6135 - force FigPackage to always draw its bounds even when they haven't changed

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java?view=diff&pathrev=18705&r1=18704&r2=18705
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigPackage.java	2010-08-30 05:48:20-0700
@@ -328,6 +328,25 @@
         forceRepaintShadow();
         setBounds(rect.x, rect.y, rect.width, rect.height);
     }
+    
+    /**
+     * Override ancestor behaviour by always calling setBounds even if the
+     * size hasn't changed. Without this override the Package bounds draw
+     * incorrectly. This is not the best fix but is a workaround until the
+     * true cause is known.
+     * 
+     * @see org.argouml.uml.diagram.ui.FigNodeModelElement#updateBounds()
+     */
+    protected void updateBounds() {
+        if (!isCheckSize()) {
+            return;
+        }
+        Rectangle bbox = getBounds();
+        Dimension minSize = getMinimumSize();
+        bbox.width = Math.max(bbox.width, minSize.width);
+        bbox.height = Math.max(bbox.height, minSize.height);
+        setBounds(bbox.x, bbox.y, bbox.width, bbox.height);
+    }    
 
     /**
      * USED BY PGML.tee.

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

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.