From 7e0c2e18b9aa462b23327caf308e643898bd21cb Mon Sep 17 00:00:00 2001 From: Pascal Obry Date: Wed, 11 Sep 2024 21:57:46 +0200 Subject: [PATCH] not too bad, just the state of the picker seems buggy. we need to select it select the shape in it ctrl+click over an area and when this is done the picker MUST be active change size / position click back on the picker (= deselect it) the area should properly be recorded. --- src/libs/colorpicker.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/libs/colorpicker.c b/src/libs/colorpicker.c index 13859425d480..1f3cdb8f6a97 100644 --- a/src/libs/colorpicker.c +++ b/src/libs/colorpicker.c @@ -1,6 +1,6 @@ /* This file is part of darktable, - Copyright (C) 2011-2023 darktable developers. + Copyright (C) 2011-2024 darktable developers. darktable is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -509,16 +509,22 @@ static gboolean _live_sample_button(GtkWidget *widget, printf("picker is active %d\n", is_active); - if(0 && is_active && data->target_sample) + if(is_active && data->target_sample) { printf("===================> copy back sample\n"); // Copy only the position & style for sample memcpy(&data->target_sample->point, &data->primary_sample.point, sizeof(data->primary_sample.point)); - memcpy(&data->target_sample->box, + memcpy(&darktable.lib->proxy.colorpicker.selected_sample->box, + //&data->target_sample->box, &data->primary_sample.box, sizeof(data->primary_sample.box)); + /* + memcpy(&darktable.lib->proxy.colorpicker.selected_sample->box, + &data->primary_sample.box, + sizeof(data->primary_sample.box)); + */ // Size cannot be changed at this point, but in case this is done // in the future. data->target_sample->size = data->primary_sample.size;