public void mergeAllLayers(boolean createUndo) {
		if (layers.size() > 1) {
			if (createUndo) {
				addUndo(new CPUndoMergeAllLayers());
			}

			fusionLayers();
			layers.clear();

			CPLayer layer = new CPLayer(width, height);
			layer.name = getDefaultLayerName();
			layer.copyDataFrom(fusion);
			layers.add(layer);
			setActiveLayer(0);

			invalidateFusion();
			callListenersLayerChange();
		}
	}