Browse Source

small fix

dominik.rieder 7 years ago
parent
commit
949c1cc4b5
1 changed files with 11 additions and 0 deletions
  1. 11 0
      src/ui/view/splitPane.java

+ 11 - 0
src/ui/view/splitPane.java

@@ -613,6 +613,8 @@ public class splitPane extends JSplitPane implements GraphListener {
 	@Override
 	public void addTrackedObject(ArrayList<AbstractCpsObject> hlList) {
 		objectsNode.removeAllChildren();
+		switchesNode.removeAllChildren();
+		gridsNode.removeAllChildren();
 		objectHashtable.clear();
 		if (hlList.size() > 0 && hlList != null) {
 			for (AbstractCpsObject abs : hlList) {
@@ -647,6 +649,15 @@ public class splitPane extends JSplitPane implements GraphListener {
 				}
 			}
 		}
+		if(objectsNode.getChildCount() == 0){
+			objectsNode.add(new DefaultMutableTreeNode("empty"));
+		}
+		if(switchesNode.getChildCount() == 0){
+			objectsNode.add(new DefaultMutableTreeNode("empty"));
+		}
+		if(gridsNode.getChildCount() == 0){
+			gridsNode.add(new DefaultMutableTreeNode("empty"));
+		}
 
 	}