Revision adacf42f
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureTreeEditor.java | ||
---|---|---|
218 | 218 |
operations.forEach(operation->AbstractUtility.executeOperation(operation, sync)); |
219 | 219 |
operations.clear(); |
220 | 220 |
|
221 |
// List<FeatureTree> trees = (List<FeatureTree>) viewer.getInput(); |
|
222 |
// CdmStore.getService(IFeatureTreeService.class).merge(trees); |
|
221 |
/* |
|
222 |
* reload feature trees is needed to update i.e. |
|
223 |
* temporarily created feature nodes by adding features. |
|
224 |
* This is related to the current saving strategy which |
|
225 |
* emulates all changes on the visible feature tree but |
|
226 |
* the actual change is done when saving via executeOperation() |
|
227 |
*/ |
|
228 |
Object[] expandedElements = viewer.getExpandedElements(); |
|
229 |
viewer.getTree().removeAll(); |
|
230 |
List<FeatureTree> trees = CdmStore.getService(IFeatureTreeService.class).list(FeatureTree.class, null, null, null, null); |
|
231 |
viewer.setInput(trees); |
|
232 |
viewer.setExpandedElements(expandedElements); |
|
223 | 233 |
|
224 | 234 |
this.setDirty(false); |
225 | 235 |
} |
Also available in: Unified diff
Fix NPE for editing newly added feature nodes