Revision: 1797
          
http://spring-rich-c.svn.sourceforge.net/spring-rich-c/?rev=1797&view=rev
Author:   jhoskens
Date:     2007-08-09 04:41:51 -0700 (Thu, 09 Aug 2007)

Log Message:
-----------
Added a check in doRemovePageComponent to avoid removing all components when 
pageComponent isn't shown.

Modified Paths:
--------------
    
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationPage.java

Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationPage.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationPage.java
        2007-08-01 21:02:09 UTC (rev 1796)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationPage.java
        2007-08-09 11:41:51 UTC (rev 1797)
@@ -54,10 +54,19 @@
         pageComponent.getControl();
     }
 
+    /**
+        * [EMAIL PROTECTED]
+        * 
+        * Only one pageComponent is shown at a time, so if it's the active one,
+        * remove all components from this page.
+        */
     protected void doRemovePageComponent( PageComponent pageComponent ) {
-        this.control.removeAll();
-        this.control.validate();
-        this.control.repaint();
+        if (pageComponent == getActiveComponent())
+        {
+               this.control.removeAll();
+               this.control.validate();
+               this.control.repaint();
+        }
     }
 
     protected boolean giveFocusTo( PageComponent pageComponent ) {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
spring-rich-c-cvs mailing list
spring-rich-c-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs

Reply via email to