Revision fb9ff83a
Added by Patrick Plitzner about 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureTreeEditor.java | ||
---|---|---|
49 | 49 |
import eu.etaxonomy.cdm.model.description.FeatureTree; |
50 | 50 |
import eu.etaxonomy.taxeditor.featuretree.AvailableFeaturesWizard; |
51 | 51 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
52 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
52 | 53 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySession; |
53 | 54 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled; |
54 | 55 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
... | ... | |
98 | 99 |
new FeatureNodeDropAdapter(this, composite.getViewer()), this, new SelectionAdapter() { |
99 | 100 |
@Override |
100 | 101 |
public void widgetSelected(SelectionEvent e) { |
102 |
if(isDirty()){ |
|
103 |
if(MessagingUtils.confirmDialog("Editor has to be saved", "You have to save before loading another feature tree. Save now?")){ |
|
104 |
save(); |
|
105 |
} |
|
106 |
else{ |
|
107 |
return; |
|
108 |
} |
|
109 |
|
|
110 |
} |
|
101 | 111 |
FeatureTree tree = FeatureTreeSelectionDialog.select(shell, conversation, null); |
102 | 112 |
if (tree != null) { |
103 | 113 |
composite.setSelectedTree(tree, FeatureTreeEditor.this); |
Also available in: Unified diff
ref #6786 Save before opening new feature tree