[gimp/blend-tool-fun] app: Sync opacity and paint-mode properties with blend_tool->image_map
- From: Michael Henning <mhenning src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/blend-tool-fun] app: Sync opacity and paint-mode properties with blend_tool->image_map
- Date: Tue, 24 Jun 2014 19:42:07 +0000 (UTC)
commit 39eedac7d74e471e9b8bacd60dca035c28d275bc
Author: Michael Henning <drawoc darkrefraction com>
Date: Tue Jun 24 15:17:45 2014 -0400
app: Sync opacity and paint-mode properties with blend_tool->image_map
app/tools/gimpblendtool.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimpblendtool.c b/app/tools/gimpblendtool.c
index 9113b42..9e9c6bd 100644
--- a/app/tools/gimpblendtool.c
+++ b/app/tools/gimpblendtool.c
@@ -800,6 +800,7 @@ gimp_blend_tool_options_notify (GimpTool *tool,
GimpToolOptions *options,
const GParamSpec *pspec)
{
+ GimpContext *context = GIMP_CONTEXT (options);
GimpBlendTool *blend_tool = GIMP_BLEND_TOOL (tool);
/* Sync any property changes on the config object that match the op */
@@ -816,6 +817,15 @@ gimp_blend_tool_options_notify (GimpTool *tool,
gimp_image_map_apply (blend_tool->image_map, NULL);
}
+ else if (! strcmp (pspec->name, "opacity") ||
+ ! strcmp (pspec->name, "paint-mode"))
+ {
+ gimp_image_map_set_mode (blend_tool->image_map,
+ gimp_context_get_opacity (context),
+ gimp_context_get_paint_mode (context));
+
+ gimp_image_map_apply (blend_tool->image_map, NULL);
+ }
}
/* Image map stuff */
@@ -824,6 +834,9 @@ static void
gimp_blend_tool_create_image_map (GimpBlendTool *blend_tool,
GimpDrawable *drawable)
{
+ GimpBlendOptions *options = GIMP_BLEND_TOOL_GET_OPTIONS (blend_tool);
+ GimpContext *context = GIMP_CONTEXT (options);
+
if (! blend_tool->graph)
gimp_blend_tool_create_graph (blend_tool);
@@ -838,6 +851,10 @@ gimp_blend_tool_create_image_map (GimpBlendTool *blend_tool,
g_signal_connect (blend_tool->image_map, "flush",
G_CALLBACK (gimp_blend_tool_image_map_flush),
blend_tool);
+
+ gimp_image_map_set_mode (blend_tool->image_map,
+ gimp_context_get_opacity (context),
+ gimp_context_get_paint_mode (context));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]