[gimp] app: (selection editor) fix clicking on selection mask or dropping color
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: (selection editor) fix clicking on selection mask or dropping color
- Date: Mon, 17 Aug 2020 11:42:56 +0000 (UTC)
commit bd452d7df1162e026eb3b0ba2ebe72c133ce96e2
Author: Jehan <jehan girinstud io>
Date: Mon Aug 17 13:32:36 2020 +0200
app: (selection editor) fix clicking on selection mask or dropping color
I discover that the selection editor has these hidden features that (1)
you can click on the selection mask (in the editor dockable) and it
behaves like the Select by Color tool (not sure exactly how useful this
feature is as you can't really see where you click though) and (2) you
can drop a color and it will select this color also as though clicked by
the Select by Color tool (which looks quite useful!).
These features use the option values as set in the Select by Color tool.
Unfortunately both these features were broken when a non-zero threshold
was set because it expects a [0-1] range whereas threshold is [0-255].
Fix the parameters in gimp_channel_select_by_color() call.
app/widgets/gimpselectioneditor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpselectioneditor.c b/app/widgets/gimpselectioneditor.c
index 38b60f5fbc..69e6f95dab 100644
--- a/app/widgets/gimpselectioneditor.c
+++ b/app/widgets/gimpselectioneditor.c
@@ -286,7 +286,7 @@ gimp_selection_view_button_press (GtkWidget *widget,
drawable,
options->sample_merged,
&color,
- options->threshold,
+ options->threshold / 255.0,
options->select_transparent,
options->select_criterion,
operation,
@@ -334,7 +334,7 @@ gimp_selection_editor_drop_color (GtkWidget *widget,
drawable,
options->sample_merged,
color,
- options->threshold,
+ options->threshold / 255.0,
options->select_transparent,
options->select_criterion,
sel_options->operation,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]