diff options
-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 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); } } |