Browse Source

Merge branch 'Ohne_Drag_and_Drop' of https://git.tk.informatik.tu-darmstadt.de/carlos.garcia/praktikum-holons into Ohne_Drag_and_Drop

dominik.rieder 7 years ago
parent
commit
b28c53e8d8
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/ui/view/GUI.java

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

@@ -899,11 +899,15 @@ 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);
+									unitGraph.fillArrayofValue();
 									tempList.remove(0);
 								}
+							} else if (cps instanceof HolonSwitch) {
+								unitGraph.repaintWithNewSwitch((HolonSwitch) cps);
+								unitGraph.fillArrayofBooleans();
 							}
 						}
 						unitGraph.empty();
@@ -1160,7 +1164,7 @@ public class GUI<E> implements CategoryListener {
 			private void showMenu(MouseEvent e) {
 				popup.show(e.getComponent(), e.getX(), e.getY());
 			}
-			
+
 		});
 	}