浏览代码

Fix to ColorPicker behaviour when entering html.

R. K 7 年之前
父节点
当前提交
2ef29d35bd
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      scene/gui/color_picker.cpp

+ 3 - 0
scene/gui/color_picker.cpp

@@ -159,7 +159,10 @@ void ColorPicker::_html_entered(const String &p_html) {
 	if (updating)
 		return;
 
+	float last_alpha = color.a;
 	color = Color::html(p_html);
+	if (!is_editing_alpha())
+		color.a = last_alpha;
 
 	if (!is_inside_tree())
 		return;