[gimp] app: update fg/bg colors when committing a colormap change.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: update fg/bg colors when committing a colormap change.
- Date: Fri, 8 Mar 2019 16:39:30 +0000 (UTC)
commit f6bfc2f23b7d138461678229b803b43d03dd2e94
Author: Jehan <jehan girinstud io>
Date: Fri Mar 8 16:32:53 2019 +0100
app: update fg/bg colors when committing a colormap change.
Since the color being currently edited is the selected one, it makes
sense that the fg/bg color should be updated appropriately.
(cherry picked from commit 628960ed22662e19045fafe840df900c8358fdd3)
app/widgets/gimpcolormapeditor.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/app/widgets/gimpcolormapeditor.c b/app/widgets/gimpcolormapeditor.c
index 059ada2047..441ac942f3 100644
--- a/app/widgets/gimpcolormapeditor.c
+++ b/app/widgets/gimpcolormapeditor.c
@@ -762,7 +762,8 @@ gimp_colormap_editor_edit_color_update (GimpColorDialog *dialog,
GimpColorDialogState state,
GimpColormapEditor *editor)
{
- GimpImage *image = GIMP_IMAGE_EDITOR (editor)->image;
+ GimpImageEditor *image_editor = GIMP_IMAGE_EDITOR (editor);
+ GimpImage *image = image_editor->image;
if (image)
{
@@ -773,6 +774,11 @@ gimp_colormap_editor_edit_color_update (GimpColorDialog *dialog,
switch (state)
{
case GIMP_COLOR_DIALOG_OK:
+ if (state & gimp_get_toggle_behavior_mask ())
+ gimp_context_set_background (image_editor->context, color);
+ else
+ gimp_context_set_foreground (image_editor->context, color);
+ /* Pass through */
case GIMP_COLOR_DIALOG_CANCEL:
gtk_widget_hide (editor->color_dialog);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]