Просмотр исходного кода

switch array auffüllen beim laden

Kevin Trometer 7 лет назад
Родитель
Сommit
25fddb9c72
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      src/ui/view/GUI.java

+ 4 - 2
src/ui/view/GUI.java

@@ -899,11 +899,13 @@ public class GUI<E> implements CategoryListener {
 						ArrayList<HolonElement> tempList = new ArrayList<>();
 						for (CpsObject cps : model.getObjectsOnCanvas()) {
 							if (cps instanceof HolonObject) {
-								for (HolonElement h : ((HolonObject)cps).getElements()) {
+								for (HolonElement h : ((HolonObject) cps).getElements()) {
 									tempList.add(h);
 									unitGraph.repaintWithNewElement(tempList);
 									tempList.remove(0);
 								}
+							} else if (cps instanceof HolonSwitch) {
+								unitGraph.repaintWithNewSwitch((HolonSwitch) cps);
 							}
 						}
 						unitGraph.empty();
@@ -1160,7 +1162,7 @@ public class GUI<E> implements CategoryListener {
 			private void showMenu(MouseEvent e) {
 				popup.show(e.getComponent(), e.getX(), e.getY());
 			}
-			
+
 		});
 	}