From c2784f55885b0d38a0dfd3f22a0f0a62be9d18a1 Mon Sep 17 00:00:00 2001
From: Patrick Plitzner
Date: Mon, 12 Sep 2016 14:21:46 +0200
Subject: [PATCH] ref #5801 Leave concept view active when editing in
details/supplemental view
---
.../editor/view/concept/ConceptViewPart.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java
index 015600a06..8fa2c650f 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java
@@ -33,11 +33,14 @@ import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
+import eu.etaxonomy.taxeditor.editor.view.media.MediaViewPart;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
import eu.etaxonomy.taxeditor.model.LineSelection;
import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
+import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
+import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart;
/**
* @author n.hoffmann
@@ -60,8 +63,13 @@ implements IPartContentHasDetails, IPartContentHasSupplementalData{
showEmptyPage();
return;
}
-
- if(part instanceof BulkEditor && selection instanceof LineSelection){
+
+ if (part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart) {
+ // do not show empty page as these views are also used to edit the
+ // description selected in this view
+ return;
+ }
+ else if(part instanceof BulkEditor && selection instanceof LineSelection){
if(((LineSelection) selection).getFirstElement() instanceof Taxon){
showViewer(part, (LineSelection) selection);
}
@@ -70,12 +78,10 @@ implements IPartContentHasDetails, IPartContentHasSupplementalData{
}
return;
}
-
else if(part instanceof AbstractGraphKeyEditor){
showEmptyPage();
return;
}
-
else if(part instanceof MultiPageTaxonEditor){
if(! part.equals(this.part)){
IEditorInput input = ((IEditorPart) part).getEditorInput();
--
2.34.1