mirror of https://github.com/GNOME/gimp.git
connect to the context's "brush-changed" signal and update the brush
2006-05-06 Michael Natterer <mitch@gimp.org> * app/tools/gimppainttool.c: connect to the context's "brush-changed" signal and update the brush core's brush accordingly. Fixes inconsistent brush preview when not moving the mouse while the brush changes (bug #323404).
This commit is contained in:
parent
549df3a0df
commit
c2061e2922
|
@ -1,3 +1,10 @@
|
|||
2006-05-06 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimppainttool.c: connect to the context's
|
||||
"brush-changed" signal and update the brush core's brush
|
||||
accordingly. Fixes inconsistent brush preview when not moving
|
||||
the mouse while the brush changes (bug #323404).
|
||||
|
||||
2006-05-06 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimpparamspecs.[ch]: added "gboolean none_ok" members
|
||||
|
|
|
@ -107,6 +107,9 @@ static void gimp_paint_tool_color_picked (GimpColorTool *color_tool,
|
|||
GimpRGB *color,
|
||||
gint color_index);
|
||||
|
||||
static void gimp_paint_tool_brush_changed (GimpContext *context,
|
||||
GimpBrush *brush,
|
||||
GimpPaintTool *paint_tool);
|
||||
static void gimp_paint_tool_set_brush (GimpBrushCore *brush_core,
|
||||
GimpBrush *brush,
|
||||
GimpPaintTool *paint_tool);
|
||||
|
@ -211,9 +214,13 @@ gimp_paint_tool_constructor (GType type,
|
|||
|
||||
if (GIMP_IS_BRUSH_CORE (paint_tool->core))
|
||||
{
|
||||
g_signal_connect (paint_tool->core, "set-brush",
|
||||
G_CALLBACK (gimp_paint_tool_set_brush),
|
||||
paint_tool);
|
||||
g_signal_connect_object (tool->tool_info->tool_options, "brush-changed",
|
||||
G_CALLBACK (gimp_paint_tool_brush_changed),
|
||||
paint_tool, 0);
|
||||
|
||||
g_signal_connect (paint_tool->core, "set-brush",
|
||||
G_CALLBACK (gimp_paint_tool_set_brush),
|
||||
paint_tool);
|
||||
g_signal_connect_after (paint_tool->core, "set-brush",
|
||||
G_CALLBACK (gimp_paint_tool_set_brush_after),
|
||||
paint_tool);
|
||||
|
@ -870,6 +877,17 @@ gimp_paint_tool_color_picked (GimpColorTool *color_tool,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_paint_tool_brush_changed (GimpContext *context,
|
||||
GimpBrush *brush,
|
||||
GimpPaintTool *paint_tool)
|
||||
{
|
||||
GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_tool->core);
|
||||
|
||||
if (brush_core->main_brush != brush)
|
||||
gimp_brush_core_set_brush (brush_core, brush);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_paint_tool_set_brush (GimpBrushCore *brush_core,
|
||||
GimpBrush *brush,
|
||||
|
|
|
@ -107,6 +107,9 @@ static void gimp_paint_tool_color_picked (GimpColorTool *color_tool,
|
|||
GimpRGB *color,
|
||||
gint color_index);
|
||||
|
||||
static void gimp_paint_tool_brush_changed (GimpContext *context,
|
||||
GimpBrush *brush,
|
||||
GimpPaintTool *paint_tool);
|
||||
static void gimp_paint_tool_set_brush (GimpBrushCore *brush_core,
|
||||
GimpBrush *brush,
|
||||
GimpPaintTool *paint_tool);
|
||||
|
@ -211,9 +214,13 @@ gimp_paint_tool_constructor (GType type,
|
|||
|
||||
if (GIMP_IS_BRUSH_CORE (paint_tool->core))
|
||||
{
|
||||
g_signal_connect (paint_tool->core, "set-brush",
|
||||
G_CALLBACK (gimp_paint_tool_set_brush),
|
||||
paint_tool);
|
||||
g_signal_connect_object (tool->tool_info->tool_options, "brush-changed",
|
||||
G_CALLBACK (gimp_paint_tool_brush_changed),
|
||||
paint_tool, 0);
|
||||
|
||||
g_signal_connect (paint_tool->core, "set-brush",
|
||||
G_CALLBACK (gimp_paint_tool_set_brush),
|
||||
paint_tool);
|
||||
g_signal_connect_after (paint_tool->core, "set-brush",
|
||||
G_CALLBACK (gimp_paint_tool_set_brush_after),
|
||||
paint_tool);
|
||||
|
@ -870,6 +877,17 @@ gimp_paint_tool_color_picked (GimpColorTool *color_tool,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_paint_tool_brush_changed (GimpContext *context,
|
||||
GimpBrush *brush,
|
||||
GimpPaintTool *paint_tool)
|
||||
{
|
||||
GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_tool->core);
|
||||
|
||||
if (brush_core->main_brush != brush)
|
||||
gimp_brush_core_set_brush (brush_core, brush);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_paint_tool_set_brush (GimpBrushCore *brush_core,
|
||||
GimpBrush *brush,
|
||||
|
|
Loading…
Reference in New Issue