Commit 7476328f authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

compare the old and new angle using an epsilon of 0.0001 degrees so we

2002-11-18  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprotatetool.c (roatate_angle_changed): compare the
	old and new angle using an epsilon of 0.0001 degrees so we don't
	get double "angle changed" because of rounding foobar.

	* app/tools/gimptransformtool.c: made GimpTransformTool subclasses
	which don't use the grid (namely the flip tool) work correctly
	again by looking at transform_tool->use_grid more often.
parent 9a8a6227
2002-11-18 Michael Natterer <mitch@gimp.org>
* app/tools/gimprotatetool.c (roatate_angle_changed): compare the
old and new angle using an epsilon of 0.0001 degrees so we don't
get double "angle changed" because of rounding foobar.
* app/tools/gimptransformtool.c: made GimpTransformTool subclasses
which don't use the grid (namely the flip tool) work correctly
again by looking at transform_tool->use_grid more often.
2002-11-18 Sven Neumann <sven@gimp.org>
 
* app/core/gimpcontainer.c (gimp_container_get_child_by_name):
......
......@@ -384,7 +384,9 @@ rotate_angle_changed (GtkWidget *widget,
value = gimp_deg_to_rad (GTK_ADJUSTMENT (widget)->value);
if (value != transform_tool->trans_info[ANGLE])
#define ANGLE_EPSILON 0.0001
if (ABS (value - transform_tool->trans_info[ANGLE]) > ANGLE_EPSILON)
{
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
......@@ -394,6 +396,8 @@ rotate_angle_changed (GtkWidget *widget,
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
}
#undef ANGLE_EPSILON
}
static void
......
......@@ -406,7 +406,7 @@ gimp_transform_tool_button_release (GimpTool *tool,
tr_tool = GIMP_TRANSFORM_TOOL (tool);
/* if we are creating, there is nothing to be done...exit */
if (tr_tool->function == TRANSFORM_CREATING)
if (tr_tool->function == TRANSFORM_CREATING && tr_tool->use_grid)
return;
/* if the 3rd button isn't pressed, transform the selected mask */
......@@ -456,7 +456,7 @@ gimp_transform_tool_motion (GimpTool *tool,
tr_tool = GIMP_TRANSFORM_TOOL (tool);
/* if we are creating, there is nothing to be done so exit. */
if (tr_tool->function == TRANSFORM_CREATING)
if (tr_tool->function == TRANSFORM_CREATING || ! tr_tool->use_grid)
return;
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
......@@ -517,6 +517,9 @@ gimp_transform_tool_oper_update (GimpTool *tool,
tr_tool = GIMP_TRANSFORM_TOOL (tool);
draw_tool = GIMP_DRAW_TOOL (tool);
if (! tr_tool->use_grid)
return;
if (gdisp == tool->gdisp)
{
gdouble closest_dist;
......@@ -934,9 +937,8 @@ gimp_transform_tool_bounds (GimpTransformTool *tr_tool,
/* find the boundaries */
if (tiles)
{
tile_manager_get_offsets (tiles,
&tr_tool->x1, &tr_tool->y1);
tile_manager_get_offsets (tiles, &tr_tool->x1, &tr_tool->y1);
tr_tool->x2 = tr_tool->x1 + tile_manager_width (tiles);
tr_tool->y2 = tr_tool->y1 + tile_manager_height (tiles);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment