Skip to content

Commit

Permalink
Merge pull request #795 from Spartan322/4.3-fix/colorpicker-left-sample
Browse files Browse the repository at this point in the history
[4.3] Fix `ColorPicker` inactive left side sample reset
  • Loading branch information
Spartan322 authored Oct 25, 2024
2 parents 3ea4092 + e3ac6fb commit acff656
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scene/gui/color_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,9 @@ void ColorPicker::_update_text_value() {
}

void ColorPicker::_sample_input(const Ref<InputEvent> &p_event) {
if (!display_old_color) {
return;
}
const Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) {
const Rect2 rect_old = Rect2(Point2(), Size2(sample->get_size().width * 0.5, sample->get_size().height * 0.95));
Expand Down

0 comments on commit acff656

Please sign in to comment.