ref #5801 Leave concept view active when editing in details/supplemental
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 12 Sep 2016 12:21:46 +0000 (14:21 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 12 Sep 2016 12:21:46 +0000 (14:21 +0200)
view

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java

index 015600a06cf733315ddf18b5d01168c285a0bffb..8fa2c650fcabf673b9cea369e06ea1202c11fe06 100644 (file)
@@ -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();