Revision: 4041
Author: [email protected]
Date: Mon Dec 13 15:27:13 2010
Log: FIXED BUG 3121: OLAP Panes did not resize according to model names.
http://code.google.com/p/power-architect/source/detail?r=4041

Modified:
 /trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenComponent.java
 /trunk/src/main/java/ca/sqlpower/architect/swingui/olap/OLAPPaneUI.java

=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenComponent.java Tue Dec 7 14:09:21 2010 +++ /trunk/src/main/java/ca/sqlpower/architect/swingui/PlayPenComponent.java Mon Dec 13 15:27:13 2010
@@ -229,11 +229,11 @@
logger.debug("getPlayPen() returned null. Not generating repaint request."); //$NON-NLS-1$
             return;
         } else {
-            Rectangle r = new Rectangle(topLeftCorner, lengths);
             setMagicEnabled(false);
             updateLengths(true);
- if (logger.isDebugEnabled()) logger.debug("Scheduling repaint at "+r); //$NON-NLS-1$
             setMagicEnabled(true);
+            Rectangle r = new Rectangle(topLeftCorner, lengths);
+ if (logger.isDebugEnabled()) logger.debug("Scheduling repaint at "+r); //$NON-NLS-1$
             pp.zoomRect(r);
             pp.repaint(r);
         }
=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/olap/OLAPPaneUI.java Fri Jun 11 09:19:49 2010 +++ /trunk/src/main/java/ca/sqlpower/architect/swingui/olap/OLAPPaneUI.java Mon Dec 13 15:27:13 2010
@@ -153,7 +153,7 @@
         width = MINIMUM_WIDTH;
         width = Math.max(
                 width,
-                calculateTextWidth(cp, cp.getName()) +
+                calculateTextWidth(cp, cp.getModelName()) +
OSUtils.iconFor(olapPane.getModel()).getIconWidth() + ICON_TITLE_HGAP);
         for (PaneSection<? extends C> ps : olapPane.getSections()) {
             width = Math.max(width, calculateMaxSectionWidth(ps, cp));

Reply via email to