Git commit 4711c1f823cc09d4f35abe70146ae5fdf8662002 by Dmitry Kazakov. Committed on 03/11/2016 at 08:23. Pushed by dkazakov into branch 'krita/3.1'. Don't merge onion skins when merging two layers That was quite an old bug :) BUG:363115 CC:kimageshop@kde.org M +30 -4 libs/image/kis_layer_utils.cpp http://commits.kde.org/krita/4711c1f823cc09d4f35abe70146ae5fdf8662002 diff --git a/libs/image/kis_layer_utils.cpp b/libs/image/kis_layer_utils.cpp index d6af9d3..6a841aa 100644 --- a/libs/image/kis_layer_utils.cpp +++ b/libs/image/kis_layer_utils.cpp @@ -172,6 +172,30 @@ namespace KisLayerUtils { MergeDownInfoBaseSP m_info; }; = + struct DisableOnionSkins : public KisCommandUtils::AggregateCommand { + DisableOnionSkins(MergeDownInfoBaseSP info) : m_info(info) {} + + void populateChildCommands() override { + Q_FOREACH (KisNodeSP node, m_info->allSrcNodes()) { + recursiveApplyNodes(node, + [this] (KisNodeSP node) { + if (KisLayerPropertiesIcons::nodeP= roperty(node, KisLayerPropertiesIcons::onionSkins, false).toBool()) { + + KisBaseNode::PropertyList prop= s =3D node->sectionModelProperties(); + KisLayerPropertiesIcons::setNo= deProperty(&props, + = KisLayerPropertiesIcons::onionSkins, + = false); + + addCommand(new KisNodeProperty= ListCommand(node, props)); + } + }); + } + } + + private: + MergeDownInfoBaseSP m_info; + }; + struct RefreshHiddenAreas : public KUndo2Command { RefreshHiddenAreas(MergeDownInfoBaseSP info) : m_info(info) {} = @@ -738,9 +762,10 @@ namespace KisLayerUtils { if (layer->visible() && prevLayer->visible()) { MergeDownInfoSP info(new MergeDownInfo(image, prevLayer, layer= )); = - // disable key strokes on all colorize masks and wait until - // update is finished with a barrier + // disable key strokes on all colorize masks, all onion skins = on + // paint layers and wait until update is finished with a barri= er applicator.applyCommand(new DisableColorizeKeyStrokes(info)); + applicator.applyCommand(new DisableOnionSkins(info)); applicator.applyCommand(new KUndo2Command(), KisStrokeJobData:= :BARRIER); = applicator.applyCommand(new KeepMergedNodesSelected(info, fals= e)); @@ -1029,9 +1054,10 @@ namespace KisLayerUtils { if (mergedNodes.size() > 1 || invisibleNodes.isEmpty()) { MergeMultipleInfoSP info(new MergeMultipleInfo(image, mergedNo= des)); = - // disable key strokes on all colorize masks and wait until - // update is finished with a barrier + // disable key strokes on all colorize masks, all onion skins = on + // paint layers and wait until update is finished with a barri= er applicator.applyCommand(new DisableColorizeKeyStrokes(info)); + applicator.applyCommand(new DisableOnionSkins(info)); applicator.applyCommand(new KUndo2Command(), KisStrokeJobData:= :BARRIER); = applicator.applyCommand(new KeepMergedNodesSelected(info, putA= fter, false));