public History<Drawable> undo(){
		if (historyStack.size() == 0 || historyIndex <= EMPTY || Settings.turnOffUndo){
			return null;
		}
		addRedo();
		redoIndex= redoIndex-1 <=  0 ? 1 : --redoIndex;
//		historyIndex = Math.min(historyIndex, historyStack.size()-1);
		return historyStack.get(historyIndex--);
	}