ref #6728: update titleCache if author is edited
authorKatja Luther <k.luther@bgbm.org>
Tue, 12 Dec 2017 08:56:25 +0000 (09:56 +0100)
committerKatja Luther <k.luther@bgbm.org>
Tue, 12 Dec 2017 08:56:25 +0000 (09:56 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/ReferenceDetailElement.java

index b50ee1426d211d055de42da7a13c69119be57bfd..b7699955069a070b4650efa1cc7841f7e429e554 100644 (file)
@@ -429,7 +429,7 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
                // selections
                else if (eventSource == selection_authorTeam) {
                        getEntity().setAuthorship(
-                                       (TeamOrPersonBase) selection_authorTeam.getSelection());
+                                       (TeamOrPersonBase) selection_authorTeam.getEntity());
                } else if (eventSource == selection_inReference) {
                        getEntity().setInReference(selection_inReference.getSelection());
                } else if (eventSource == selection_inSeries) {
@@ -489,6 +489,10 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
                    if(!getEntity().isProtectedAbbrevTitleCache()){
                        getEntity().setAbbrevTitleCache(null, getEntity().isProtectedAbbrevTitleCache());
                    }
+                   if(!getEntity().isProtectedTitleCache()){
+                getEntity().setTitleCache(null, getEntity().isProtectedTitleCache());
+            }
+
                        toggleable_cache.setText(getEntity().getTitleCache());
                        toggleableAbbrevCache.setText(getEntity().getAbbrevTitleCache());
                }