You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2009/05/20 19:38:38 UTC

svn commit: r776781 - in /incubator/pivot/trunk/wtk/src/pivot/wtk: Component.java content/TableViewRowEditor.java

Author: gbrown
Date: Wed May 20 17:38:37 2009
New Revision: 776781

URL: http://svn.apache.org/viewvc?rev=776781&view=rev
Log:
Minor fix to Component and TablePaneRowEditor.

Modified:
    incubator/pivot/trunk/wtk/src/pivot/wtk/Component.java
    incubator/pivot/trunk/wtk/src/pivot/wtk/content/TableViewRowEditor.java

Modified: incubator/pivot/trunk/wtk/src/pivot/wtk/Component.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtk/Component.java?rev=776781&r1=776780&r2=776781&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtk/Component.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtk/Component.java Wed May 20 17:38:37 2009
@@ -1233,7 +1233,8 @@
             }
 
             // Ensure the layout is valid
-            if (visible) {
+            if (visible
+                && !valid) {
                 validate();
             }
 

Modified: incubator/pivot/trunk/wtk/src/pivot/wtk/content/TableViewRowEditor.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtk/content/TableViewRowEditor.java?rev=776781&r1=776780&r2=776781&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtk/content/TableViewRowEditor.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtk/content/TableViewRowEditor.java Wed May 20 17:38:37 2009
@@ -63,11 +63,11 @@
      */
     private Image tableRowImage = new Image() {
         public int getWidth() {
-            return tableView.getRowBounds(rowIndex).width;
+            return (tableView == null) ? 0 : tableView.getRowBounds(rowIndex).width;
         }
 
         public int getHeight() {
-            return tableView.getRowBounds(rowIndex).height;
+            return (tableView == null) ? 0 : tableView.getRowBounds(rowIndex).height;
         }
 
         public void paint(Graphics2D graphics) {