take the aspect ratio from the size box when the user activates the

2006-12-29  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpscaletool.c (gimp_scale_tool_size_notify): take
	the aspect ratio from the size box when the user activates the
	constraint by pressing the chain button.
This commit is contained in:
Sven Neumann
2006-12-29 20:48:42 +00:00
committed by Sven Neumann
parent 4cbb8d7fad
commit 52058ce9e7
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-12-29 Sven Neumann <sven@gimp.org>
* app/tools/gimpscaletool.c (gimp_scale_tool_size_notify): take
the aspect ratio from the size box when the user activates the
constraint by pressing the chain button.
2006-12-29 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.[ch]: store the original aspect ratio.

View File

@ -365,6 +365,19 @@ gimp_scale_tool_size_notify (GtkWidget *box,
if (constrain != options->constrain)
{
gint width;
gint height;
g_object_get (box,
"width", &width,
"height", &height,
NULL);
/* Take the aspect ratio from the size box when the user
* activates the constraint by pressing the chain button.
*/
tr_tool->aspect = (gdouble) width / (gdouble) height;
g_object_set (options,
"constrain", constrain,
NULL);