From 28449546ae898ca191b4cfc4699564150c3b83eb Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 1 Sep 1999 20:16:18 +0000 Subject: [PATCH] finally found that bug that annoyed me to death at the camp --Sven --- ChangeLog | 6 ++++++ app/paint_core.c | 9 ++++++--- app/tools/paint_core.c | 9 ++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e54cda410..78a4cc257f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Sep 1 22:16:41 MEST 1999 Sven Neumann + + * app/paint_core.c: Only set the defaults for non_gui operations + if the paint_core is really used in non_gui mode. This fixes a bug + that showed up when drawing lines with a pressure-sensitive device. + Wed Sep 1 21:12:42 MEST 1999 Sven Neumann * plug-ins/common/screenshot.c: a small bugfix diff --git a/app/paint_core.c b/app/paint_core.c index 9f5057414b..c595deb783 100644 --- a/app/paint_core.c +++ b/app/paint_core.c @@ -627,9 +627,12 @@ paint_core_init (PaintCore *paint_core, paint_core->cury = y; /* Set up some defaults for non-gui use */ - paint_core->startpressure = paint_core->lastpressure = paint_core->curpressure = 0.5; - paint_core->startxtilt = paint_core->lastxtilt = paint_core->curxtilt = 0; - paint_core->startytilt = paint_core->lastytilt = paint_core->curytilt = 0; + if (paint_core == &non_gui_paint_core) + { + paint_core->startpressure = paint_core->lastpressure = paint_core->curpressure = 0.5; + paint_core->startxtilt = paint_core->lastxtilt = paint_core->curxtilt = 0; + paint_core->startytilt = paint_core->lastytilt = paint_core->curytilt = 0; + } /* Each buffer is the same size as the maximum bounds of the active brush... */ if (brush && brush != get_active_brush ()) diff --git a/app/tools/paint_core.c b/app/tools/paint_core.c index 9f5057414b..c595deb783 100644 --- a/app/tools/paint_core.c +++ b/app/tools/paint_core.c @@ -627,9 +627,12 @@ paint_core_init (PaintCore *paint_core, paint_core->cury = y; /* Set up some defaults for non-gui use */ - paint_core->startpressure = paint_core->lastpressure = paint_core->curpressure = 0.5; - paint_core->startxtilt = paint_core->lastxtilt = paint_core->curxtilt = 0; - paint_core->startytilt = paint_core->lastytilt = paint_core->curytilt = 0; + if (paint_core == &non_gui_paint_core) + { + paint_core->startpressure = paint_core->lastpressure = paint_core->curpressure = 0.5; + paint_core->startxtilt = paint_core->lastxtilt = paint_core->curxtilt = 0; + paint_core->startytilt = paint_core->lastytilt = paint_core->curytilt = 0; + } /* Each buffer is the same size as the maximum bounds of the active brush... */ if (brush && brush != get_active_brush ())