changeset 8709:71ae18553377

(issue1754) Also fixup master artifact for already loaded recommendations As the load many call creates (and needs to create) all artifacts in the reccomendations this would break "old" recommendations after a reload through the "Pencil" mode. A better fix would probably be to just set the master artifiact in the recommendations but due to the extremly weird interaction with the server at this point it is not trivial to identify how this can be done.
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 24 Apr 2015 15:57:23 +0200
parents d718edbf0b0c
children 093146703b98
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java	Fri Apr 24 12:45:55 2015 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java	Fri Apr 24 15:57:23 2015 +0200
@@ -721,17 +721,17 @@
         }
 
         for (final Recommendation recommendation: recommendations) {
-            if (collection.loadedRecommendation(recommendation)) {
-                continue;
-            }
-            newRecommendations.push(recommendation);
-
             // XXX: UGLY! If no reference artifact given use uuid of
             //      current artifact as reference.
             if (recommendation.getMasterArtifact() == null) {
                 recommendation.setMasterArtifact(masterArtifact.getUuid());
             }
 
+            if (collection.loadedRecommendation(recommendation)) {
+                GWT.log("Already loaded " +  recommendation.getDisplayName());
+                continue;
+            }
+            newRecommendations.push(recommendation);
         }
 
         loadArtifactService.loadMany(

http://dive4elements.wald.intevation.org