From 81d38532a2894b97008961251934d90bcc18c40e Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 30 Oct 2007 11:24:08 +0000 Subject: [PATCH] Fix drawing of straight lines using the Shift key and a tablet (bug 2007-10-30 Sven Neumann Fix drawing of straight lines using the Shift key and a tablet (bug #164240): * app/tools/gimppainttool.c (gimp_paint_tool_button_press): set use_pressure to FALSE when drawing a straight line. * app/paint/gimppaintbrush.c (_gimp_paintbrush_motion): respect the use_pressure flag. svn path=/trunk/; revision=23988 --- ChangeLog | 13 ++++++++++++- app/paint/gimppaintbrush.c | 2 +- app/tools/gimppainttool.c | 6 ++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9dd8cba34d..fbb05dde3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,18 @@ +2007-10-30 Sven Neumann + + Fix drawing of straight lines using the Shift key and a tablet + (bug #164240): + + * app/tools/gimppainttool.c (gimp_paint_tool_button_press): set + use_pressure to FALSE when drawing a straight line. + + * app/paint/gimppaintbrush.c (_gimp_paintbrush_motion): respect + the use_pressure flag. + 2007-10-30 Sven Neumann * app/display/gimpdisplayshell-render.c (box_filter): reduce - rounding errors. Fixed bug #491503. + rounding errors. Fixes bug #491503. * app/base/tile-pyramid.c (tile_pyramid_write_quarter): reduce rounding errors. diff --git a/app/paint/gimppaintbrush.c b/app/paint/gimppaintbrush.c index 2c559c76e7..fd05472147 100644 --- a/app/paint/gimppaintbrush.c +++ b/app/paint/gimppaintbrush.c @@ -169,7 +169,7 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core, area->bytes); } - if (pressure_options->opacity) + if (paint_core->use_pressure && pressure_options->opacity) opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure; /* finally, let the brush core paste the colored area on the canvas */ diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c index 6dd6944e5a..34e6b487b0 100644 --- a/app/tools/gimppainttool.c +++ b/app/tools/gimppainttool.c @@ -338,10 +338,12 @@ gimp_paint_tool_button_press (GimpTool *tool, */ gboolean hard; - core->start_coords = core->last_coords; - hard = (gimp_paint_options_get_brush_mode (paint_options) == GIMP_BRUSH_HARD); + + core->start_coords = core->last_coords; + core->use_pressure = FALSE; + gimp_paint_tool_round_line (core, hard, state); }