public void undo() {
			super.undo();
			switch (undoID) {
			case UndoAction.BLOCK_REMOVE:
				undoRemoveMarkedAtoms(nRemoved);
				if (removedObstacles != null) {
					for (RectangularObstacle i : removedObstacles)
						obstacles.add(i);
					if (nRemoved <= 0 && removedObstacles.length == 1)
						removedObstacles[0].setSelected(true);
				}
				if (removedLayers != null) {
					for (Layered i : removedLayers)
						layerBasket.add(i);
					if (nRemoved <= 0 && removedLayers.length == 1)
						((ModelComponent) removedLayers[0]).setSelected(true);
				}
				break;
			case UndoAction.REMOVE_RADIAL_BOND:
				if (removedObject instanceof Object[]) {
					Object[] o = (Object[]) removedObject;
					if (o[0] instanceof RadialBond) {
						bonds.add((RadialBond) o[0]);
						((RadialBond) o[0]).setSelected(true);
					}
					if (o[1] instanceof List) {
						List x = (List) o[1];
						for (Iterator it = x.iterator(); it.hasNext();)
							bends.add((AngularBond) it.next());
					}
					MoleculeCollection.sort(model);
				}
				break;
			case UndoAction.REMOVE_ANGULAR_BOND:
				if (removedObject instanceof AngularBond) {
					bends.add((AngularBond) removedObject);
					((AngularBond) removedObject).setSelected(true);
				}
				break;
			case UndoAction.REMOVE_OBSTACLE:
				if (removedObject instanceof RectangularObstacle) {
					RectangularObstacle r = (RectangularObstacle) removedObject;
					if (!model.getRecorderDisabled())
						r.initializeMovieQ(model.getMovie().getCapacity());
					obstacles.add(r);
					r.setSelected(true);
				}
				break;
			case SACD_ID:
				undoRemoveMarkedAtoms(1);
				break;
			case SNTD_ID:
				undoRemoveMarkedAtoms(2);
				break;
			}
			model.notifyChange();
			repaint();
		}