[gimp] app: GimpBrushTool: don't set a BAD cursor permanently
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: GimpBrushTool: don't set a BAD cursor permanently
- Date: Wed, 30 Mar 2011 17:20:26 +0000 (UTC)
commit 2e406872c415c29a3f247232ea046c0d81377a8d
Author: Michael Natterer <mitch gimp org>
Date: Wed Mar 30 19:18:29 2011 +0200
app: GimpBrushTool: don't set a BAD cursor permanently
by chaining up after setting it. Instead, don't set it and call
gimp_tool_set_cursor() directly when there is no brush or no dynamics.
app/tools/gimpbrushtool.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/app/tools/gimpbrushtool.c b/app/tools/gimpbrushtool.c
index 6be7a97..0d11b88 100644
--- a/app/tools/gimpbrushtool.c
+++ b/app/tools/gimpbrushtool.c
@@ -189,15 +189,17 @@ gimp_brush_tool_oper_update (GimpTool *tool,
{
GimpBrushTool *brush_tool = GIMP_BRUSH_TOOL (tool);
GimpPaintOptions *paint_options = GIMP_PAINT_TOOL_GET_OPTIONS (tool);
- GimpDrawable *drawable = gimp_image_get_active_drawable (gimp_display_get_image (display));
+ GimpDrawable *drawable;
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state,
proximity, display);
- if (! gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)) &&
- drawable && proximity)
+ drawable = gimp_image_get_active_drawable (gimp_display_get_image (display));
+
+ if (! gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)) &&
+ drawable && proximity)
{
GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool);
GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_tool->core);
@@ -242,8 +244,11 @@ gimp_brush_tool_cursor_update (GimpTool *tool,
{
if (! brush_core->main_brush || ! brush_core->dynamics)
{
- gimp_tool_control_set_cursor_modifier (tool->control,
- GIMP_CURSOR_MODIFIER_BAD);
+ gimp_tool_set_cursor (tool, display,
+ gimp_tool_control_get_cursor (tool->control),
+ gimp_tool_control_get_tool_cursor (tool->control),
+ GIMP_CURSOR_MODIFIER_BAD);
+ return;
}
else if (! brush_tool->show_cursor &&
gimp_tool_control_get_cursor_modifier (tool->control) !=
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]