Commit 1c000ac6 authored by Dmitry Kazakov's avatar Dmitry Kazakov

On reset and reload the mode of the transform tool should be restored

parent 42e3ae1a
......@@ -64,6 +64,8 @@ void KisLiquifyProperties::saveMode() const
cfg.writeEntry("useWashMode", m_useWashMode);
cfg.writeEntry("flow", m_flow);
KConfigGroup globalCfg = KGlobal::config()->group("LiquifyTool");
globalCfg.writeEntry("mode", (int)m_mode);
}
void KisLiquifyProperties::loadMode()
......@@ -80,3 +82,11 @@ void KisLiquifyProperties::loadMode()
m_useWashMode = cfg.readEntry("useWashMode", m_useWashMode);
m_flow = cfg.readEntry("flow", m_flow);
}
void KisLiquifyProperties::loadAndResetMode()
{
loadMode();
KConfigGroup globalCfg = KGlobal::config()->group("LiquifyTool");
m_mode = (LiquifyMode) globalCfg.readEntry("mode", (int)m_mode);
}
......@@ -119,6 +119,8 @@ public:
void saveMode() const;
void loadMode();
void loadAndResetMode();
private:
LiquifyMode m_mode;
qreal m_size;
......
......@@ -167,7 +167,7 @@ bool ToolTransformArgs::isIdentity() const
void ToolTransformArgs::initLiquifyTransformMode(const QRect &srcRect)
{
m_liquifyWorker.reset(new KisLiquifyTransformWorker(srcRect, 0, 8));
m_liquifyProperties.loadMode();
m_liquifyProperties.loadAndResetMode();
}
void ToolTransformArgs::saveLiquifyTransformMode() const
......
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