changeset 601:3cf6ee30207c

Register newly created CollectionViews at FLYSWorkspace to avoid an inconsistent view. flys-client/trunk@2206 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 22 Jun 2011 14:02:11 +0000
parents 347cf4a5a486
children 3b670af34367
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Jun 22 13:39:15 2011 +0000
+++ b/flys-client/ChangeLog	Wed Jun 22 14:02:11 2011 +0000
@@ -1,3 +1,10 @@
+2011-06-22  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/CollectionView.java:
+	  Register the CollectionView when a new collection is created. This is
+	  necessary to avoid an inconsistent view that would otherwise display
+	  projects that might have been deleted.
+
 2011-06-22  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/ProjectList.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Wed Jun 22 13:39:15 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Wed Jun 22 14:02:11 2011 +0000
@@ -374,6 +374,10 @@
      * @param collection The new collection.
      */
     protected void setCollection(Collection collection) {
+        if (collection != null && this.collection == null) {
+            flys.getWorkspace().addView(collection.identifier(), this);
+        }
+
         Collection tmp  = this.collection;
         this.collection = collection;
 

http://dive4elements.wald.intevation.org