merge with local branch
[taxeditor.git] / eu.etaxonomy.taxeditor.navigation / src / main / java / eu / etaxonomy / taxeditor / navigation / navigator / handler / DeleteHandler.java
index 6dd3d548b0c62a15acc02da283ba8e635b9d346c..ecbc76b929bcf8b837d4c8bc0fced02405984fb6 100644 (file)
@@ -86,12 +86,15 @@ public class DeleteHandler extends AbstractHandler{
                }
                AbstractPostOperation operation = null;
                TaxonDeletionConfigurator config = new TaxonDeletionConfigurator();
+               config.setDeleteInAllClassifications(false);
+
                if (treeNodes.size() == 1 ){
                        try {
 
                                ITaxonTreeNode treeNode = treeNodes.iterator().next();
                                ITaxonTreeNode taxonNode =treeNode;
                                TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
+
                                //configNodes.setDeleteTaxon(false);
                                if (taxonNode instanceof Classification && taxonNode.hasChildNodes()){
                                        if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the classification? The tree has children, they will be deleted, too.")){
@@ -112,17 +115,17 @@ public class DeleteHandler extends AbstractHandler{
                                 "Do you really want to delete the selected node? It has childnodes, they will be deleted, too.",
                                 MessageDialog.WARNING, new String[] { "Delete all children",
                                         "Move children to parent node", "Skip" }, 0);
-                                               int result = dialog.open();
+                                               int dialog_result = dialog.open();
 
-                                               if (result == 0){
+                                               if (dialog_result == 0){
                                                        //delete all children
                                                        configNodes.setChildHandling(ChildHandling.DELETE);
                                                        config.setTaxonNodeConfig(configNodes);
-                                               } else if (result == 1){
+                                               } else if (dialog_result == 1){
                                                        //move children
                                                        configNodes.setChildHandling(ChildHandling.MOVE_TO_PARENT);
                                                        config.setTaxonNodeConfig(configNodes);
-                                               } else if (result == 2){
+                                               } else if (dialog_result == 2){
                                                        //skip
                                                        return null;