Enforce constraints of any pending rectangle when setting a constraint.

2007-09-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_set_constraint): Enforce constraints of any
	pending rectangle when setting a constraint.

svn path=/trunk/; revision=23615
This commit is contained in:
Martin Nordholts 2007-09-22 18:20:29 +00:00 committed by Martin Nordholts
parent 24f9ed8446
commit 7b65c24e35
2 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-09-22 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_set_constraint): Enforce constraints of any
pending rectangle when setting a constraint.
2007-09-22 Simon Budig <simon@gimp.org>
* plug-ins/script-fu/tinyscheme/scheme.c: further simplifications.

View File

@ -430,6 +430,20 @@ gimp_rectangle_tool_set_constraint (GimpRectangleTool *tool,
private->constraint = constraint;
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
gimp_rectangle_tool_clamp (tool,
NULL,
constraint,
FALSE);
gimp_rectangle_tool_update_highlight (tool);
gimp_rectangle_tool_update_handle_sizes (tool);
gimp_rectangle_tool_rectangle_changed (tool);
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
g_object_notify (G_OBJECT (tool), "constraint");
}
@ -3454,6 +3468,9 @@ gimp_rectangle_tool_get_constraints (GimpRectangleTool *rectangle_tool,
tool = GIMP_TOOL (rectangle_tool);
if (tool->display == NULL)
return;
switch (constraint)
{
case GIMP_RECTANGLE_CONSTRAIN_IMAGE: