Browse Source

fix the addElement (now with correct ID)

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

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

@@ -310,9 +310,8 @@ public class GUI implements CategoryListener {
 						&& tempCpsObject.getID() != 0) {
 					addElementPopUp = new AddElementPopUp();
 					addElementPopUp.setVisible(true);
-					controller.addElementCanvasObject(tempCpsObject.getName(),
-							addElementPopUp.getElement().getEleName(), addElementPopUp.getElement().getAmount(),
-							addElementPopUp.getElement().getEnergy());
+					controller.addElementCanvasObject(tempCpsObject.getID(), addElementPopUp.getElement().getEleName(),
+							addElementPopUp.getElement().getAmount(), addElementPopUp.getElement().getEnergy());
 				}
 			}
 		});