Fix set_pick_color error

This commit is contained in:
Tomasz Chabora 2019-06-19 14:52:54 +02:00
parent 66a854da78
commit 9bdf110840
2 changed files with 9 additions and 3 deletions

View file

@ -126,7 +126,7 @@ void ColorPicker::_update_controls() {
}
}
void ColorPicker::set_pick_color(const Color &p_color, bool p_update_sliders) {
void ColorPicker::_set_pick_color(const Color &p_color, bool p_update_sliders) {
color = p_color;
if (color != last_hsv) {
@ -142,6 +142,11 @@ void ColorPicker::set_pick_color(const Color &p_color, bool p_update_sliders) {
_update_color(p_update_sliders);
}
void ColorPicker::set_pick_color(const Color &p_color) {
_set_pick_color(p_color, true); //because setters can't have more arguments
}
void ColorPicker::set_edit_alpha(bool p_show) {
edit_alpha = p_show;
@ -175,7 +180,7 @@ void ColorPicker::_value_changed(double) {
}
}
set_pick_color(color, false);
_set_pick_color(color, false);
emit_signal("color_changed", color);
}

View file

@ -108,7 +108,8 @@ public:
void set_edit_alpha(bool p_show);
bool is_editing_alpha() const;
void set_pick_color(const Color &p_color, bool p_update_sliders = true);
void _set_pick_color(const Color &p_color, bool p_update_sliders);
void set_pick_color(const Color &p_color);
Color get_pick_color() const;
void add_preset(const Color &p_color);