diff options
author | Majin Sniper <majinsniper@gmx.de> | 2009-03-14 14:50:10 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-14 08:46:37 -0600 |
commit | 90c43c8d53c4e50f09cf3bf6bc8518e0d27b8e57 (patch) | |
tree | b621f8c05ca2be59510ee2ce89006ce4a0f4c40c /src/gui/palette.cpp | |
parent | 90e29d12a044030c140382c038c4b01e722113e7 (diff) | |
download | mana-90c43c8d53c4e50f09cf3bf6bc8518e0d27b8e57.tar.gz mana-90c43c8d53c4e50f09cf3bf6bc8518e0d27b8e57.tar.bz2 mana-90c43c8d53c4e50f09cf3bf6bc8518e0d27b8e57.tar.xz mana-90c43c8d53c4e50f09cf3bf6bc8518e0d27b8e57.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.cpp | 9 |
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); } } |