commit 5bd41add3a2019bfd41ed1e23f8e4de30648b64e
Author: Katja Luther <k.luther@bgbm.org>
Date:   Thu Oct 15 11:26:11 2015 +0200

    fix move taxonnode in natural order

diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapter.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapter.java
index e0f8a0566..bdf2eb91c 100644
--- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapter.java
+++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapter.java
@@ -238,7 +238,7 @@ public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOpera
 				TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
 
 				AbstractPostOperation operation = new MoveTaxonOperation
-						("Move Taxon", workspaceUndoContext, uuids, targetNode.getParent(), this, taxonNavigator, false);
+						("Move Taxon", workspaceUndoContext, uuids, targetNode, this, taxonNavigator, false);
 				NavigationUtil.executeOperation(operation);
 
 				logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java
index 842f9a8c6..6b698ffcf 100644
--- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java
+++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java
@@ -244,7 +244,7 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
 				    NavigationUtil.executeOperation(operation, null);
 				} else {
 				    AbstractPostOperation operation = new MoveTaxonOperation
-				            ("Move Taxon", workspaceUndoContext, uuids, targetNode.getParent(), this, taxonNavigator, false);
+				            ("Move Taxon", workspaceUndoContext, uuids, targetNode, this, taxonNavigator, false);
 				    NavigationUtil.executeOperation(operation);
 				}
 				logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java
index 830d572a4..eef8af10c 100644
--- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java
+++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java
@@ -84,7 +84,7 @@ public class MoveTaxonOperation extends AbstractPersistentPostOperation {
 		bind();
 		monitor.worked(20);
 
-		UpdateResult result = CdmStore.getService(ITaxonNodeService.class).moveTaxonNodes(this.taxonNodesUuid,newParentTreeNode.getUuid());
+		UpdateResult result = CdmStore.getService(ITaxonNodeService.class).moveTaxonNodes(this.taxonNodesUuid,newParentTreeNode.getUuid(), moveToParentNode);
 //		try {
 //			for (TaxonNode taxonNode : taxonNodes){
 //				TaxonNode newTaxonNode = newParentTreeNode.addChildNode(taxonNode,
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java
index 65e514478..fca68db76 100644
--- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java
+++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java
@@ -32,7 +32,7 @@ public class RemotingMoveTaxonOperation extends RemotingCdmUpdateOperation {
 
     private final static String LABEL = "Move Taxon operation";
 
-    private Set<UUID> taxonNodesToMoveUuid;
+    private final Set<UUID> taxonNodesToMoveUuid;
     private final UUID newParentTreeNodeUuid;
     private final boolean moveToParentNode;
 
@@ -77,7 +77,7 @@ public class RemotingMoveTaxonOperation extends RemotingCdmUpdateOperation {
     @Override
     protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
         return CdmApplicationState.getService(ITaxonNodeService.class).moveTaxonNodes(taxonNodesToMoveUuid,
-                newParentTreeNodeUuid);
+                newParentTreeNodeUuid, moveToParentNode);
     }
 
 }
