Commit a4121aa4 authored by Boudewijn Rempt's avatar Boudewijn Rempt

don't even try to merge if there's nothing to merge

parent fa6e85ab
......@@ -724,9 +724,10 @@ void KisLayerManager::mergeLayer()
KisLayerSP layer = activeLayer();
if (!layer) return;
if (!layer->prevSibling()) return;
if (layer->metaData()->isEmpty() && layer->prevSibling() && dynamic_cast<KisLayer*>(layer->prevSibling().data())->metaData()->isEmpty()) {
const KisMetaData::MergeStrategy* strategy = KisMetaData::MergeStrategyRegistry::instance()->get("Drop");
image->mergeDown(layer, strategy);
image->mergeDown(layer, KisMetaData::MergeStrategyRegistry::instance()->get("Drop"));
else {
const KisMetaData::MergeStrategy* strategy = KisMetaDataMergeStrategyChooserWidget::showDialog(m_view);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment