Revision e3259fb3
Added by Katja Luther about 9 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/dnd/NameEditorDropTargetListener.java | ||
---|---|---|
9 | 9 |
import org.eclipse.swt.dnd.DropTargetAdapter; |
10 | 10 |
import org.eclipse.swt.dnd.DropTargetEvent; |
11 | 11 |
|
12 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
|
12 | 13 |
import eu.etaxonomy.cdm.model.common.ICdmBase; |
13 | 14 |
import eu.etaxonomy.cdm.model.name.HomotypicalGroup; |
14 | 15 |
import eu.etaxonomy.cdm.model.reference.Reference; |
... | ... | |
68 | 69 |
|
69 | 70 |
/** {@inheritDoc} */ |
70 | 71 |
public void drop(DropTargetEvent dropTargetEvent) { |
71 |
|
|
72 |
if (!EditorUtil.forceUserSave(target.getEditor(), dropTargetEvent.display.getActiveShell())){ |
|
73 |
return ; |
|
74 |
} |
|
72 | 75 |
TaxonBase taxonBase = getDroppedTaxonBase(dropTargetEvent); |
73 | 76 |
|
74 | 77 |
Assert.isNotNull(taxonBase); |
... | ... | |
102 | 105 |
|
103 | 106 |
private AbstractPostOperation createOperation(TaxonBase taxonBase) { |
104 | 107 |
|
108 |
|
|
105 | 109 |
if(taxonBase instanceof Synonym){ |
106 | 110 |
Synonym synonym = (Synonym) taxonBase; |
107 | 111 |
|
Also available in: Unified diff