diff flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSWorkspace.java @ 600:347cf4a5a486

Open projects are removed from screen if the user deletes them (via project list). flys-client/trunk@2205 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 22 Jun 2011 13:39:15 +0000
parents 62b65b7b5c7c
children 9acbd3f98262
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSWorkspace.java	Wed Jun 22 12:50:20 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSWorkspace.java	Wed Jun 22 13:39:15 2011 +0000
@@ -60,5 +60,21 @@
         view.show();
         view.restore();
     }
+
+
+    /**
+     * Removes a project from workspace (view) and clears its reference from
+     * hash map.
+     *
+     * @param uuid The project's uuid.
+     */
+    public void destroyProject(String uuid) {
+        CollectionView project = views.get(uuid);
+
+        if (project != null) {
+            removeProject(uuid);
+            project.destroy();
+        }
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org