Revision ad00b0fa
Added by Patrick Plitzner almost 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureTreeEditor.java | ||
---|---|---|
206 | 206 |
private class AddButtonListener extends SelectionAdapter { |
207 | 207 |
@Override |
208 | 208 |
public void widgetSelected(SelectionEvent e) { |
209 |
AvailableFeaturesWizard wizard = new AvailableFeaturesWizard( |
|
210 |
composite.getFeatureTree()); |
|
209 |
AvailableFeaturesWizard wizard = new AvailableFeaturesWizard(); |
|
211 | 210 |
WizardDialog dialog = new WizardDialog(e.widget.getDisplay().getActiveShell(), wizard); |
212 | 211 |
|
213 | 212 |
if (dialog.open() == IStatus.OK) { |
214 | 213 |
FeatureNode parent = ((FeatureTree) composite.getViewer().getInput()).getRoot(); |
215 | 214 |
Collection<Feature> additionalFeatures = wizard.getAdditionalFeatures(); |
216 | 215 |
for (Feature feature : additionalFeatures) { |
217 |
CdmStore.getService(IFeatureNodeService.class).addChildFeaturNode(parent, feature); |
|
216 |
if(!getSelectedFeatureTree().getDistinctFeatures().contains(feature)){ |
|
217 |
CdmStore.getService(IFeatureNodeService.class).addChildFeaturNode(parent, feature); |
|
218 |
} |
|
218 | 219 |
} |
219 | 220 |
setDirty(true); |
220 | 221 |
composite.getViewer().refresh(); |
Also available in: Unified diff
ref #6786 Show vocabularies as root element in feature selection