From 06c094313e95d1d87d2d0bab60c3e804a78d6f13 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Thu, 25 Sep 2025 21:03:01 +0200 Subject: [PATCH] Call color_picker_callback when picking in 2d view --- paint/sources/ui_view2d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paint/sources/ui_view2d.ts b/paint/sources/ui_view2d.ts index ff59bbfd..2166a5c7 100644 --- a/paint/sources/ui_view2d.ts +++ b/paint/sources/ui_view2d.ts @@ -237,6 +237,10 @@ function ui_view2d_render() { context_raw.picked_color.base = color_set_gb(context_raw.picked_color.base, buffer_get_u8(a, i1)); context_raw.picked_color.base = color_set_bb(context_raw.picked_color.base, buffer_get_u8(a, i2)); ui_header_handle.redraws = 2; + + if (context_raw.color_picker_callback != null) { + context_raw.color_picker_callback(context_raw.picked_color); + } }); } }