fix #4821: do not show possibility to move between terms for anordered terms
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / editor / definedterm / e4 / DefinedTermDropAdapterE4.java
index 5cfe2df8de1e9da782b36e862cf53ee5eb643ef6..1a1a0aeea980dd39b54f8c78c06dee061e47de27 100644 (file)
@@ -129,9 +129,12 @@ public class DefinedTermDropAdapterE4 extends EditViewerDropAdapter {
                        TransferData transferType) {
            boolean valid = LocalSelectionTransfer.getTransfer().isSupportedType(transferType)
                 && target instanceof AbstractTermDto;
-           if(target instanceof TermVocabularyDto && getCurrentLocation()!=ViewerDropAdapter.LOCATION_ON){
+           if(target instanceof TermVocabularyDto && getCurrentLocation()!=ViewerDropAdapter.LOCATION_ON ){
                valid = false;
            }
+           if (target instanceof TermDto && ((TermDto)target).getOrderIndex() == null && getCurrentLocation() == ViewerDropAdapter.LOCATION_AFTER){
+               valid = false;
+           }
         return valid;
        }