From 89cdb669e69398f0268c5c7105a72705566533ed Mon Sep 17 00:00:00 2001
From: Patrick Plitzner
Date: Wed, 24 Oct 2018 15:12:14 +0200
Subject: [PATCH] ref #7850 Refresh vocabulary when moving terms
---
.../editor/definedterm/e4/DefinedTermEditorE4.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/DefinedTermEditorE4.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/DefinedTermEditorE4.java
index b5a179977..909de8b08 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/DefinedTermEditorE4.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/DefinedTermEditorE4.java
@@ -35,7 +35,10 @@ import org.eclipse.ui.IMemento;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermSorter;
import eu.etaxonomy.taxeditor.editor.definedterm.TermContentProvider;
@@ -127,7 +130,13 @@ IPartContentHasDetails, IPartContentHasSupplementalData, IE4SavablePart, IContex
@Override
public boolean postOperation(CdmBase objectAffectedByOperation) {
- viewer.refresh();
+ if(objectAffectedByOperation.isInstanceOf(DefinedTermBase.class)){
+ TermVocabulary vocabulary = HibernateProxyHelper.deproxy(objectAffectedByOperation, DefinedTermBase.class).getVocabulary();
+ viewer.refresh(vocabulary);
+ }
+ else{
+ viewer.refresh();
+ }
if(objectAffectedByOperation != null){
viewer.setSelection(new StructuredSelection(objectAffectedByOperation));
--
2.34.1