ref #10182: disable details view after editing name in name editor
authorKatja Luther <k.luther@bgbm.org>
Thu, 5 Jan 2023 08:28:46 +0000 (09:28 +0100)
committerKatja Luther <k.luther@bgbm.org>
Thu, 5 Jan 2023 08:28:46 +0000 (09:28 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupedContainer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java

index f85169b13e34a2ada494b7e829df8010e4e17abf..0251f0eb629bc8187f78e0b601ffac7f2a95c75e 100755 (executable)
@@ -168,7 +168,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
                                storeCursor();
                                // notify selection listener
                                setDelayedSelection();
-                               
+                               EventUtility.postAsyncEvent(WorkbenchEventConstants.ENABLE_TAXON_DETAILS, false);
 
                };
 
index c9e535f953af1b8146bbbf8a3c172fd980eb4b27..a7c2ead25a9ecd6219a9c8067667a5dd78d4e8ad 100755 (executable)
@@ -22,6 +22,8 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.TreeNode;
 import org.eclipse.swt.SWT;
+import org.eclipse.ui.forms.IFormPart;
+import org.eclipse.ui.forms.widgets.Section;
 import org.springframework.security.core.GrantedAuthority;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
@@ -984,10 +986,22 @@ public class DetailsViewerE4 extends AbstractCdmDataViewer {
     @Optional
     private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_DETAILS)boolean refresh){
         if(refresh){
-            //refresh_withoutnew_build(); this would use the update without creation of all fields
+               //refresh_withoutnew_build(); this would use the update without creation of all fields
                refresh();
         }
     }
+    
+    @Inject
+    @Optional
+    private void blockView(@UIEventTopic(WorkbenchEventConstants.ENABLE_TAXON_DETAILS)boolean enable){
+       for (IFormPart part :this.managedForm.getParts()) {
+          if (part instanceof CdmSectionPart) {
+                  ((CdmSectionPart)part).getSection().setEnabled(enable);
+          }
+       }
+       
+       
+    }
 
     @Inject
     @Optional