public boolean undo() {
	  if (hystory.size()<=1) return false;
	  int index = hystory.size() - 1;
	  hystoryRedo.add(hystory.remove(index));
	  hystory.trimToSize();
	  setMode(hystory.lastElement().getWidth()*8, hystory.lastElement().getHeight()*8);
	  map = new Vector<Integer>();
	  for (int a : hystory.lastElement().getMap()) map.add(a);
	  toRefresh=true;
	  repaint();
	  return true;
  }