summaryrefslogtreecommitdiff
path: root/src/gui/palette.cpp
diff options
context:
space:
mode:
authorMajin Sniper <majinsniper@gmx.de>2009-03-14 14:50:10 +0100
committerJared Adams <jaxad0127@gmail.com>2009-03-14 08:02:38 -0600
commitef30aa36a6559d3d39033b81fe23e225e258e312 (patch)
tree45beb6179b49273e9904ce738db784529ec0c6fc /src/gui/palette.cpp
parentc5dc783fe045b44e1bbb7c0f6e0ca95fa02278a2 (diff)
downloadmana-client-ef30aa36a6559d3d39033b81fe23e225e258e312.tar.gz
mana-client-ef30aa36a6559d3d39033b81fe23e225e258e312.tar.bz2
mana-client-ef30aa36a6559d3d39033b81fe23e225e258e312.tar.xz
mana-client-ef30aa36a6559d3d39033b81fe23e225e258e312.zip
Fix cancel button in color config dialog
Also save the committed gradient, not the one currently used.
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 0298953c..e93c7744 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -127,7 +127,7 @@ Palette::~Palette()
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()));
@@ -219,11 +219,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);
}
}