Project

General

Profile

« Previous | Next » 

Revision db06a452

Added by Katja Luther over 6 years ago

fix #7183: set selection to newly created entity in bulk editor

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/e4/handler/NewObjectHandlerE4.java
17 17
import org.eclipse.e4.ui.services.IServiceConstants;
18 18
import org.eclipse.jface.dialogs.IInputValidator;
19 19
import org.eclipse.jface.dialogs.InputDialog;
20
import org.eclipse.jface.viewers.ISelection;
21
import org.eclipse.jface.viewers.StructuredSelection;
20 22
import org.eclipse.jface.window.Window;
21 23
import org.eclipse.swt.widgets.Shell;
22 24

  
......
77 79
                if (createdEntity instanceof CdmBase){
78 80
                    bulkEditor.getEditorInput().addSaveCandidate((CdmBase)createdEntity);
79 81
                }
82
                ISelection selection = new StructuredSelection(createdEntity);
83

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

  
86

  
80 87
                bulkEditor.refresh(true);
88
                bulkEditor.getViewer().setSelection(selection, true);
81 89
                bulkEditor.setDirty();
82 90
            }
83 91
        }

Also available in: Unified diff