Paste P209

Masterwork From Distant Lands
ActivePublic

Authored by dkazakov on May 10 2018, 12:49 PM.
diff --git a/libs/image/commands/kis_image_lock_command.cpp b/libs/image/commands/kis_image_lock_command.cpp
index c743aeb..f5440af 100644
--- a/libs/image/commands/kis_image_lock_command.cpp
+++ b/libs/image/commands/kis_image_lock_command.cpp
@@ -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 (!m_lockImage) {
+ image->refreshGraph();
+ }
}
void KisImageLockCommand::undo()
@@ -44,6 +47,9 @@ void KisImageLockCommand::undo()
if (!image) {
return;
}
- image->refreshGraph();
+
+ if (m_lockImage) {
+ image->refreshGraph();
+ }
}
diff --git a/libs/image/commands/kis_image_lock_command.h b/libs/image/commands/kis_image_lock_command.h
index f925477..e5e6ba3 100644
--- a/libs/image/commands/kis_image_lock_command.h
+++ b/libs/image/commands/kis_image_lock_command.h
@@ -42,6 +42,9 @@ public:
void redo() override;
void undo() override;
+
+private:
+ bool m_lockImage;
};
dkazakov edited the content of this paste. (Show Details)May 10 2018, 12:49 PM
dkazakov changed the title of this paste from untitled to Masterwork From Distant Lands.
dkazakov updated the paste's language from autodetect to autodetect.