protected void removeMagnet(int index) {
		for (int i = 0; i < magnetList.size(); i++) {
			Magnet aMagnet = (Magnet) magnetList.get(i);
			if (aMagnet.getVarIndex() == index) {
				getCanvas().getLayer().removeChild(aMagnet);
				magnetList.remove(i);
				break;
			}
		}

		if (controlWindow != null)
			controlWindow.refresh();
	}