changeset 896:fe23bbf0ea11

Fixed a problem with renaming collection view title and duplicating projects. flys-client/trunk@2741 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 14 Sep 2011 12:00:22 +0000
parents 9acbd3f98262
children 2b6efb8b2301
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSWorkspace.java flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java
diffstat 3 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Sep 14 11:36:06 2011 +0000
+++ b/flys-client/ChangeLog	Wed Sep 14 12:00:22 2011 +0000
@@ -1,3 +1,9 @@
+2011-09-14  Raimund Renkert <raimund.renkert@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/FLYSWorkspace.java,
+	  src/main/java/de/intevation/flys/client/client/ui/ProjectList.java:
+	  Fixed a problem with renaming collection view title and duplicating projects.
+
 2011-09-14  Raimund Renkert <raimund.renkert@intevation.de>
 
 	Issue166
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSWorkspace.java	Wed Sep 14 11:36:06 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSWorkspace.java	Wed Sep 14 12:00:22 2011 +0000
@@ -82,5 +82,13 @@
         CollectionView view = views.get(uuid);
         view.setTitle(title);
     }
+
+
+    public boolean hasView(String uuid) {
+        if(views.get(uuid) != null) {
+            return true;
+        }
+        return false;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java	Wed Sep 14 11:36:06 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java	Wed Sep 14 12:00:22 2011 +0000
@@ -448,7 +448,9 @@
 
             public void onSuccess(Void v) {
                 updateUserCollections();
-                flys.getWorkspace().updateTitle(c.identifier(), c.getName());
+                if(flys.getWorkspace().hasView(c.identifier())) {
+                    flys.getWorkspace().updateTitle(c.identifier(), c.getName());
+                }
             }
         });
     }

http://dive4elements.wald.intevation.org