Project

General

Profile

« Previous | Next » 

Revision 0eaf479c

Added by Katja Luther almost 6 years ago

setSelection in bulkeditor only if the model contains the selected object

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4.java
412 412
    @Optional
413 413
    @Inject
414 414
    private void updateAfterSearch(@UIEventTopic(WorkbenchEventConstants.BULK_EDITOR_SEARCH_FINISHED)IStructuredSelection selection){
415

  
416

  
415 417
        if(selection!=null){
416 418
            setSelection(selection);
417 419
        }
......
445 447
    public void setSelection(IStructuredSelection selection){
446 448
        Object[] objects = selection.toArray();
447 449
        for (Object object : objects) {
448
            if(object instanceof CdmBase){
450

  
451
            if(object instanceof CdmBase &&  input.getModel().contains(object)){
449 452
                bodyLayer.getSelectionLayer().selectRow(0, bodyDataProvider.indexOfRowObject((CdmBase) object), false, false);
450 453
            }
451 454
        }

Also available in: Unified diff