From 573d7ca0517e96198c94f49d0f7c90d98f2ddd5d Mon Sep 17 00:00:00 2001 From: jdescottes Date: Sat, 24 Oct 2015 15:41:21 +0200 Subject: [PATCH] Fix SwapColor will not replace color if their string representation is using a different case --- src/js/tools/drawing/ColorSwap.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/tools/drawing/ColorSwap.js b/src/js/tools/drawing/ColorSwap.js index cdf7b5e..7c1f281 100644 --- a/src/js/tools/drawing/ColorSwap.js +++ b/src/js/tools/drawing/ColorSwap.js @@ -56,8 +56,9 @@ }; ns.ColorSwap.prototype.applyToolOnFrame_ = function (frame, oldColor, newColor) { + oldColor = oldColor.toUpperCase(); frame.forEachPixel(function (color, col, row) { - if (color == oldColor) { + if (color && color.toUpperCase() == oldColor) { frame.pixels[col][row] = newColor; } });