summaryrefslogtreecommitdiff
path: root/src/gui/palette.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/palette.cpp')
-rw-r--r--src/gui/palette.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp
index 80b5f1f1..162081e1 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -143,7 +143,7 @@ Palette::~Palette()
colEnd = mColVector.end(); col != colEnd; ++col)
{
configName = &ColorTypeNames[col->type];
- config.setValue(*configName + "Gradient", col->grad);
+ config.setValue(*configName + "Gradient", col->comittedGrad);
if (col->grad == STATIC)
{
config.setValue(*configName, toString(col->getRGB()));
@@ -235,11 +235,12 @@ void Palette::rollback()
i != iEnd;
++i)
{
- i->grad = i->committedGrad;
- if (i->grad == STATIC)
+ if (i->grad != i->committedGrad)
{
- i->color = i->committedColor;
+ setGradient(i->type, i->committedGrad);
}
+ setColor(i->type, i->committedColor.r, i->committedColor.g,
+ i->committedColor.b);
}
}