Project

General

Profile

Revision 0eaf479c

ID0eaf479c63b4bafe9d78bc67ed0563dda28ed0db
Parent a9fcc7a1
Child d8d3a36b

Added by Katja Luther over 2 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

Add picture from clipboard (Maximum size: 40 MB)