Project

General

Profile

« Previous | Next » 

Revision 21fbfba9

Added by Patrick Plitzner almost 7 years ago

ref #6694 Always add new features to root node

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureTreeEditor.java
215 215
			WizardDialog dialog = new WizardDialog(shell, wizard);
216 216

  
217 217
			if (dialog.open() == IStatus.OK) {
218
                IStructuredSelection selection = (IStructuredSelection) composite.getViewer().getSelection();
219
                FeatureNode parent = (FeatureNode) (selection.getFirstElement() != null ? selection.getFirstElement()
220
                        : ((FeatureTree) composite.getViewer().getInput()).getRoot());
218
                FeatureNode parent = ((FeatureTree) composite.getViewer().getInput()).getRoot();
221 219
                Collection<Feature> additionalFeatures = wizard.getAdditionalFeatures();
222 220
                for (Feature feature : additionalFeatures) {
223 221
				    CdmStore.getService(IFeatureNodeService.class).addChildFeaturNode(parent, feature);

Also available in: Unified diff