Commit 0c5a02e9 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Properly make visibility change non-undoable

parent 21f7c023
......@@ -215,10 +215,9 @@ void KisNodePropertyListCommand::setNodePropertiesAutoUndo(KisNodeSP node, KisIm
*/
struct SimpleLodResettingStroke : public KisSimpleStrokeStrategy {
SimpleLodResettingStroke(KUndo2Command *cmd, KisImageSP image)
SimpleLodResettingStroke(KUndo2Command *cmd)
: KisSimpleStrokeStrategy(QLatin1String("SimpleLodResettingStroke")),
m_cmd(cmd),
m_image(image)
m_cmd(cmd)
{
setClearsRedoOnStart(false);
this->enableJob(JOB_INIT, true);
......@@ -226,15 +225,13 @@ void KisNodePropertyListCommand::setNodePropertiesAutoUndo(KisNodeSP node, KisIm
void initStrokeCallback() override {
m_cmd->redo();
m_image->setModifiedWithoutUndo();
}
private:
QScopedPointer<KUndo2Command> m_cmd;
KisImageSP m_image;
};
KisStrokeId strokeId = image->startStroke(new SimpleLodResettingStroke(cmd.take(), image));
KisStrokeId strokeId = image->startStroke(new SimpleLodResettingStroke(cmd.take()));
image->endStroke(strokeId);
}
......
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