Project

General

Profile

« Previous | Next » 

Revision 5bd41add

Added by Katja Luther over 7 years ago

fix move taxonnode in natural order

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapter.java
238 238
				TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
239 239

  
240 240
				AbstractPostOperation operation = new MoveTaxonOperation
241
						("Move Taxon", workspaceUndoContext, uuids, targetNode.getParent(), this, taxonNavigator, false);
241
						("Move Taxon", workspaceUndoContext, uuids, targetNode, this, taxonNavigator, false);
242 242
				NavigationUtil.executeOperation(operation);
243 243

  
244 244
				logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java
244 244
				    NavigationUtil.executeOperation(operation, null);
245 245
				} else {
246 246
				    AbstractPostOperation operation = new MoveTaxonOperation
247
				            ("Move Taxon", workspaceUndoContext, uuids, targetNode.getParent(), this, taxonNavigator, false);
247
				            ("Move Taxon", workspaceUndoContext, uuids, targetNode, this, taxonNavigator, false);
248 248
				    NavigationUtil.executeOperation(operation);
249 249
				}
250 250
				logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java
84 84
		bind();
85 85
		monitor.worked(20);
86 86

  
87
		UpdateResult result = CdmStore.getService(ITaxonNodeService.class).moveTaxonNodes(this.taxonNodesUuid,newParentTreeNode.getUuid());
87
		UpdateResult result = CdmStore.getService(ITaxonNodeService.class).moveTaxonNodes(this.taxonNodesUuid,newParentTreeNode.getUuid(), moveToParentNode);
88 88
//		try {
89 89
//			for (TaxonNode taxonNode : taxonNodes){
90 90
//				TaxonNode newTaxonNode = newParentTreeNode.addChildNode(taxonNode,
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java
32 32

  
33 33
    private final static String LABEL = "Move Taxon operation";
34 34

  
35
    private Set<UUID> taxonNodesToMoveUuid;
35
    private final Set<UUID> taxonNodesToMoveUuid;
36 36
    private final UUID newParentTreeNodeUuid;
37 37
    private final boolean moveToParentNode;
38 38

  
......
77 77
    @Override
78 78
    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
79 79
        return CdmApplicationState.getService(ITaxonNodeService.class).moveTaxonNodes(taxonNodesToMoveUuid,
80
                newParentTreeNodeUuid);
80
                newParentTreeNodeUuid, moveToParentNode);
81 81
    }
82 82

  
83 83
}

Also available in: Unified diff