Jelajahi Sumber

kein verschieben mehr vom highlighting

Kevin Trometer 8 tahun lalu
induk
melakukan
894a187756
2 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 2 0
      src/ui/view/GUI.java
  2. 1 2
      src/ui/view/MyCanvas.java

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

@@ -461,6 +461,8 @@ public class GUI<E> implements CategoryListener {
 						}
 						refreshTableProperties();
 						tableModelHolonElement.fireTableDataChanged();
+						controller.calculateStateForTimeStep(model.getCurIteration());
+						unitGraph.repaint();
 					}
 				} catch (Exception e) {
 

+ 1 - 2
src/ui/view/MyCanvas.java

@@ -283,7 +283,6 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
 			x = e.getX();
 			y = e.getY();
 			dragging = false;
-			tempCps.setPosition(e.getX() - controller.getScaleDiv2(), e.getY() - controller.getScaleDiv2());
 		}
 
 		// Rightclick List
@@ -297,6 +296,7 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
 		}
 
 		doMark = false;
+		controller.calculateStateForTimeStep(model.getCurIteration());
 		repaint();
 	}
 
@@ -413,7 +413,6 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
 				}
 				if (newEdge) {
 					e = new CpsEdge(cps, tempCps);
-					controller.calculateStateForTimeStep(model.getCurIteration());
 					controller.AddEdgeOnCanvas(e);
 				}
 			}