[gimp/soc-2011-warp] gimpwarptool: don't draw the effect size if under 3.0, to avoid warning/crash
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-warp] gimpwarptool: don't draw the effect size if under 3.0, to avoid warning/crash
- Date: Fri, 3 Jun 2011 19:44:39 +0000 (UTC)
commit 8422aa2ade533ffe3356cfff48fedc62e6424659
Author: Michael Muré <batolettre gmail com>
Date: Fri Jun 3 21:43:16 2011 +0200
gimpwarptool: don't draw the effect size if under 3.0, to avoid warning/crash
app/tools/gimpwarptool.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index 52563c1..8078229 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -349,7 +349,6 @@ gimp_warp_tool_button_press (GimpTool *tool,
GimpDisplay *display)
{
GimpWarpTool *wt = GIMP_WARP_TOOL (tool);
- GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
if (display != tool->display)
gimp_warp_tool_start (wt, display);
@@ -408,13 +407,16 @@ gimp_warp_tool_draw (GimpDrawTool *draw_tool)
GimpWarpTool *wt = GIMP_WARP_TOOL (draw_tool);
GimpWarpOptions *options = GIMP_WARP_TOOL_GET_OPTIONS (wt);
- gimp_draw_tool_add_handle (draw_tool,
- GIMP_HANDLE_CIRCLE,
- wt->cursor_x,
- wt->cursor_y,
- options->effect_size,
- options->effect_size,
- GIMP_HANDLE_ANCHOR_CENTER);
+ if (options->effect_size >= 3.0)
+ {
+ gimp_draw_tool_add_handle (draw_tool,
+ GIMP_HANDLE_CIRCLE,
+ wt->cursor_x,
+ wt->cursor_y,
+ options->effect_size,
+ options->effect_size,
+ GIMP_HANDLE_ANCHOR_CENTER);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]