You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/08/12 07:02:20 UTC

svn commit: r803364 - /incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java

Author: tvolkert
Date: Wed Aug 12 05:02:18 2009
New Revision: 803364

URL: http://svn.apache.org/viewvc?rev=803364&view=rev
Log:
Re-introduced immediate validation of a component that's made visible - the lack of that clause introduced the possibility that a component could be called to paint when it was in an invalid state (due to immediate repaints), which is a bug.

Modified:
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java?rev=803364&r1=803363&r2=803364&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java Wed Aug 12 05:02:18 2009
@@ -1499,6 +1499,12 @@
                 parent.repaint(getDecoratedBounds());
             }
 
+            // Ensure the layout is valid
+            if (visible
+                && !valid) {
+                validate();
+            }
+
             // Invalidate the parent
             if (parent != null) {
                 parent.invalidate();
@@ -2198,17 +2204,10 @@
 
     /**
      * Requests that focus be given to this component.
-<<<<<<< .mine
      *
      * @return
-     * <tt>true</tt> if the component gained the focus; <tt>false</tt>,
+     * <tt>true</tt> if the component gained the focus; <tt>false</tt>
      * otherwise.
-=======
-     *
-     * @return
-     * The component that got the focus, or <tt>null</tt> if the focus request
-     * was denied
->>>>>>> .r803327
      */
     public boolean requestFocus() {
         if (isFocusable()) {