Explorar o código

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 %!s(int64=8) %!d(string=hai) anos
pai
achega
b28c53e8d8
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  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());
 			}
-			
+
 		});
 	}