Require a minimum movement in the X and Y direction before we zoom in

2002-08-05  Dave Neary  <bolsh@gimp.org>

        * app/tools/gimpmagnifytool.[ch]: Require a minimum
        movement in the X and Y direction before we zoom in
        on/out to the dragged square. Limit rather arbitrarily
        set to 5. This fixes bug #86939, reported by
        philipj@telia.com.
This commit is contained in:
Dave Neary 2002-08-05 09:30:33 +00:00 committed by David Neary
parent 24e35fde91
commit 07ecc12c2a
3 changed files with 19 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2002-08-05 Dave Neary <bolsh@gimp.org>
* app/tools/gimpmagnifytool.[ch]: Require a minimum
movement in the X and Y direction before we zoom in
on/out to the dragged square. Limit rather arbitrarily
set to 5. This fixes bug #86939, reported by
philipj@telia.com.
2002-08-04 Sven Neumann <sven@gimp.org>
* plug-ins/common/gauss_iir.c

View file

@ -311,6 +311,7 @@ gimp_magnify_tool_motion (GimpTool *tool,
GimpDisplay *gdisp)
{
GimpMagnifyTool *magnify;
gint w, h;
if (!gimp_tool_control_is_active (tool->control))
return;
@ -319,9 +320,16 @@ gimp_magnify_tool_motion (GimpTool *tool,
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
magnify->w = (coords->x - magnify->x);
magnify->h = (coords->y - magnify->y);
w = (coords->x - magnify->x);
h = (coords->y - magnify->y);
if((THRESHOLD <= (w > 0 ? w : -w)) &&
(THRESHOLD <= (h > 0 ? h : -h)))
{
magnify->w = w;
magnify->h = h;
}
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
}

View file

@ -30,6 +30,7 @@
#define GIMP_IS_MAGNIFY_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_MAGNIFY_TOOL))
#define GIMP_MAGNIFY_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_MAGNIFY_TOOL, GimpMagnifyToolClass))
#define THRESHOLD 5
typedef struct _GimpMagnifyTool GimpMagnifyTool;
typedef struct _GimpMagnifyToolClass GimpMagnifyToolClass;