瀏覽代碼

[color] Fix color picker paste saving wrong values

Clement Espeute 1 年之前
父節點
當前提交
c9dfa7b770
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      hide/comp/ColorPicker.hx

+ 2 - 1
hide/comp/ColorPicker.hx

@@ -449,6 +449,8 @@ class ColorPicker extends Popup {
 		if (color == null)
 			return null;
 
+		color = color & 0xFFFFFFFF;
+
 		var containsAlpha = false;
 		switch (str.length) {
 			case 2: // Assume color is shade of gray
@@ -471,7 +473,6 @@ class ColorPicker extends Popup {
 		else if (containsAlpha && !canEditAlpha) {
 			color = (color & 0xFFFFFF) ;
 		}
-
 		return color;
 	}