Skip to content
Snippets Groups Projects
Commit dd4b3049 authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

moves the check of being disposed to the right place

refs 2553
parent cfda364c
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.EditorBase;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 85A283C9915889DCE9314B50A06B69FF
* @ConQAT.Rating YELLOW Hash: B41A78E1C4B5CE289ABE9708C75C3BE2
*/
public abstract class TreeViewerEditorBase<T extends EObject> extends EditorBase<T> {
......@@ -52,9 +52,12 @@ public abstract class TreeViewerEditorBase<T extends EObject> extends EditorBase
@Override
public void notifyChanged(Notification notification) {
super.notifyChanged(notification);
if(notification.getEventType() != Notification.REMOVING_ADAPTER &&
!treeViewer.getTree().isDisposed()) {
Display.getDefault().asyncExec(() -> treeViewer.refresh(true));
if(notification.getEventType() != Notification.REMOVING_ADAPTER) {
Display.getDefault().asyncExec(() -> {
if(!treeViewer.getTree().isDisposed()) {
treeViewer.refresh(true);
}
});
}
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment