Commit 7bada452 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix an inefficiency when converting an image

parent 48cc0615
......@@ -24,9 +24,9 @@
KisImageLockCommand::KisImageLockCommand(KisImageWSP image, bool lockImage)
: KisImageCommand(kundo2_noi18n("lock image"), image)
: KisImageCommand(kundo2_noi18n("lock image"), image),
m_lockImage(lockImage)
{
Q_UNUSED(lockImage)
}
void KisImageLockCommand::redo()
......@@ -35,7 +35,10 @@ void KisImageLockCommand::redo()
if (!image) {
return;
}
image->refreshGraph();
if (!lockImage) {
image->refreshGraph();
}
}
void KisImageLockCommand::undo()
......@@ -44,6 +47,9 @@ void KisImageLockCommand::undo()
if (!image) {
return;
}
image->refreshGraph();
if (lockImage) {
image->refreshGraph();
}
}
......@@ -42,6 +42,9 @@ public:
void redo() override;
void undo() override;
private:
bool m_lockImage;
};
......
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