Project

General

Profile

« Previous | Next » 

Revision 8309769f

Added by Patrick Plitzner almost 6 years ago

ref #7439 Propagate row selection of nattable

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/e4/handler/NewObjectHandlerE4.java
18 18
import org.eclipse.jface.dialogs.IInputValidator;
19 19
import org.eclipse.jface.dialogs.InputDialog;
20 20
import org.eclipse.jface.viewers.ISelection;
21
import org.eclipse.jface.viewers.IStructuredSelection;
21 22
import org.eclipse.jface.viewers.StructuredSelection;
22 23
import org.eclipse.jface.window.Window;
23 24
import org.eclipse.swt.widgets.Shell;
......
79 80
                if (createdEntity instanceof CdmBase){
80 81
                    bulkEditor.getEditorInput().addSaveCandidate((CdmBase)createdEntity);
81 82
                }
82
                ISelection selection = new StructuredSelection(createdEntity);
83

  
84
                ISelection prevSelection =bulkEditor.getViewer().getSelection();
85

  
83
                IStructuredSelection selection = new StructuredSelection(createdEntity);
86 84

  
87 85
                bulkEditor.refresh(true);
88 86
                bulkEditor.setDirty();
89 87
                bulkEditor.setFocus();
90 88

  
91
                bulkEditor.getViewer().setSelection(selection, true);
92
                bulkEditor.getViewer().refresh();
89
                bulkEditor.setSelection(selection);
93 90

  
94 91

  
95 92
            }

Also available in: Unified diff