Project

General

Profile

« Previous | Next » 

Revision 546da7cf

Added by Katja Luther almost 8 years ago

close delete dialog skips the delete fix #5806

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java
16 16
import org.eclipse.core.commands.AbstractHandler;
17 17
import org.eclipse.core.commands.ExecutionEvent;
18 18
import org.eclipse.core.commands.ExecutionException;
19
import org.eclipse.core.runtime.Status;
19 20
import org.eclipse.jface.dialogs.MessageDialog;
20 21
import org.eclipse.jface.viewers.ISelection;
21 22
import org.eclipse.jface.viewers.IStructuredSelection;
......
132 133

  
133 134
							DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the name?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
134 135
							int result_dialog= dialog.open();
135
							if (result_dialog == 1){
136
							if (result_dialog != Status.OK){
136 137
								return null;
137 138
							}
138 139
							result = service.delete(((TaxonNameBase) object).getUuid(), config);
......
148 149
								if (((Taxon)object).getTaxonNodes().isEmpty()){
149 150
								    dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the taxon?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
150 151
								    int result_dialog= dialog.open();
151
	                                if (result_dialog == 1){
152
	                                if (result_dialog != Status.OK){
152 153
	                                    return null;
153 154
	                                }
154 155
	                                result = service.deleteTaxon(((TaxonBase) object).getUuid(), config, null);
......
162 163
								SynonymDeletionConfigurator config = new SynonymDeletionConfigurator();
163 164
								DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the synonym?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
164 165
                                int result_dialog= dialog.open();
165
                                if (result_dialog == 1){
166
                                if (result_dialog != Status.OK){
166 167
                                     return null;
167 168
                                }
168 169
								result = service.deleteSynonym(((Synonym)object).getUuid(), config);

Also available in: Unified diff