[gimp] app: fix painting with force == 0
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix painting with force == 0
- Date: Mon, 10 Apr 2017 14:01:41 +0000 (UTC)
commit d4bb12d8b89e30e3f1cdfbe6fba16383a21fd93d
Author: Ell <ell_se yahoo com>
Date: Mon Apr 10 09:41:10 2017 -0400
app: fix painting with force == 0
Should be a nop, but instead does the same thing as force == 0.5.
app/paint/gimpbrushcore.c | 3 +++
app/paint/gimpheal.c | 3 +++
app/paint/gimppaintoptions.c | 2 +-
3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index 970bfac..6e8ec5b 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -1483,6 +1483,9 @@ gimp_brush_core_get_brush_mask (GimpBrushCore *core,
{
const GimpTempBuf *mask;
+ if (dynamic_force <= 0.0)
+ return NULL;
+
mask = gimp_brush_core_transform_mask (core, core->brush, op);
if (! mask)
diff --git a/app/paint/gimpheal.c b/app/paint/gimpheal.c
index 2c06b94..56322b8 100644
--- a/app/paint/gimpheal.c
+++ b/app/paint/gimpheal.c
@@ -506,6 +506,9 @@ gimp_heal_motion (GimpSourceCore *source_core,
GIMP_BRUSH_HARD,
force);
+ if (! mask_buf)
+ return;
+
/* check that all buffers are of the same size */
if (src_rect->width != gegl_buffer_get_width (paint_buffer) ||
src_rect->height != gegl_buffer_get_height (paint_buffer))
diff --git a/app/paint/gimppaintoptions.c b/app/paint/gimppaintoptions.c
index 8756388..843fbc4 100644
--- a/app/paint/gimppaintoptions.c
+++ b/app/paint/gimppaintoptions.c
@@ -951,7 +951,7 @@ gimp_paint_options_get_brush_mode (GimpPaintOptions *paint_options)
dynamic_force = gimp_dynamics_is_output_enabled (dynamics,
GIMP_DYNAMICS_OUTPUT_FORCE);
- if (dynamic_force || (paint_options->brush_force > 0.0))
+ if (dynamic_force || (paint_options->brush_force != 0.5))
return GIMP_BRUSH_PRESSURE;
return GIMP_BRUSH_SOFT;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]