From 44ac32359f02e0fb1c1e585ecc5e13073956769f Mon Sep 17 00:00:00 2001 From: Brita Keller Date: Mon, 27 Jan 2020 20:37:53 +0100 Subject: [PATCH] Fixed #19 - Fixed sync of streamlist --- .../scviewer/e4/application/parts/DesignBrowser.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java index f2444fa..b9a92dd 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java @@ -199,12 +199,16 @@ public class DesignBrowser { @Override public void selectionChanged(SelectionChangedEvent event) { ISelection selection=event.getSelection(); - if( selection instanceof IStructuredSelection) { + if( selection instanceof IStructuredSelection) { Object object= ((IStructuredSelection)selection).getFirstElement(); - if(object instanceof IHierNode&& ((IHierNode)object).getChildNodes().size()!=0){ + if(object instanceof IHierNode && ((IHierNode)object).getChildNodes().size()!=0){ txTableViewer.setInput(object); updateButtons(); } + else { //if selection is changed but empty + txTableViewer.setInput(null); + updateButtons(); + } } } }); @@ -250,8 +254,8 @@ public class DesignBrowser { @Override public void selectionChanged(SelectionChangedEvent event) { - selectionService.setSelection(event.getSelection()); - updateButtons(); + selectionService.setSelection(event.getSelection()); + updateButtons(); } });