Skip to content

Commit

Permalink
not too bad, just the state of the picker seems buggy.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
TurboGit committed Sep 11, 2024
1 parent 5eb84b3 commit 7e0c2e1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/libs/colorpicker.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7e0c2e1

Please sign in to comment.