Sfoglia il codice sorgente

Fixed selecting multiple HolonElements not affecting some fields.

Specifically "use global"/stretching mode and local period.
I expected this to be a bigger fix, so I made a branch, sorry.
Ludwig Tietze 6 anni fa
parent
commit
c16eab4b9c
1 ha cambiato i file con 2 aggiunte e 4 eliminazioni
  1. 2 4
      src/ui/view/UnitGraph.java

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

@@ -849,9 +849,7 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
      * @param localPeriod
      */
     public void setLocalPeriod(int localPeriod){
-    	//TODO: local Graph length for each HolonElelemt
-    	this.current.setLocalPeriod(localPeriod);
-    	
+    	for(IGraphedElement e:tempElements)e.setLocalPeriod(localPeriod);
     }
     
     /**
@@ -868,7 +866,7 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
     }
     
     public void setStretching(boolean b){
-    	current.setStretching(b);
+    	for(IGraphedElement e:tempElements)e.setStretching(b);
     }