Selaa lähdekoodia

probably fixes Cables into UpperNodes - but who knows^^

Andreas T. Meyer-Berg 7 vuotta sitten
vanhempi
commit
156f5ac284
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      src/classes/CpsEdge.java
  2. 1 1
      src/ui/view/AbstractCanvas.java

+ 1 - 1
src/classes/CpsEdge.java

@@ -271,7 +271,7 @@ public class CpsEdge {
     public void setConnected(int state) {
         isConnected = state;
         if (state == CON_UPPER_NODE_AND_INSIDE) {
-            maxCapacity = CAPACITY_TO_UPPER_NODE;
+            //maxCapacity = CAPACITY_TO_UPPER_NODE;
         }
     }
 

+ 1 - 1
src/ui/view/AbstractCanvas.java

@@ -75,7 +75,7 @@ public abstract class AbstractCanvas extends JPanel {
     String paintEdge(CpsEdge con, String maxCap) {
         if (con.getA().getId() != model.getSelectedObjectID() && con.getB().getId() != model.getSelectedObjectID()
                 && con != edgeHighlight) {
-            if (con.getConnected() == CpsEdge.CON_UPPER_NODE) {
+            if (con.getConnected() == CpsEdge.CON_UPPER_NODE || con.getConnected() == CpsEdge.CON_UPPER_NODE_AND_INSIDE) {
                 setEdgeState(con);
             } else {
                 g2.setColor(Color.DARK_GRAY);