Browse Source

One mor fix

Edgardo Palza 8 years ago
parent
commit
e8d32947bf
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/ui/view/GUI.java

+ 3 - 3
src/ui/view/GUI.java

@@ -873,6 +873,7 @@ public class GUI<E> implements CategoryListener {
 					int selValueY = (int) Math.floor(yProThis / 16);
 					int selValueX = (int) Math.floor(xProThis / (tableProperties.getWidth() / 2));
 					temp = tableModelProperties.getValueAt(selValueY, selValueX);
+					System.out.println(getActualCps());
 					if (getActualCps() != null) {
 						if (getActualCps() instanceof HolonSwitch) {
 							btemp = tableModelProperties.getValueAt(mousePos.y / tableProperties.getRowHeight(),
@@ -898,9 +899,8 @@ public class GUI<E> implements CategoryListener {
 							getActualCps().setName(temp.toString());
 						}
 					} else {
-
 						temp = tableModelProperties.getValueAt(selValueY, selValueX);
-						if (selValueY / tableProperties.getRowHeight() == 2) {
+						if (selValueY == 2) {
 							Float ftemp;
 							if (Float.parseFloat(temp.toString()) >= 0.0) {
 								ftemp = Float.parseFloat(temp.toString());
@@ -908,7 +908,7 @@ public class GUI<E> implements CategoryListener {
 								ftemp = model.getSelectedEdge().getCapacity();
 							}
 							model.getSelectedEdge().setCapacity(ftemp);
-						} else if (selValueY / tableProperties.getRowHeight() == 3) {
+						} else if (selValueY == 3) {
 							Boolean bTemp = Boolean.parseBoolean(temp.toString());
 							model.getSelectedEdge().setState(bTemp);
 						}