Commit 4f698cd3 authored by William Skaggs's avatar William Skaggs

Bill Skaggs <weskaggs@primate.ucdavis.edu>

	* libgimpwidgets/gimpwidgets.c (gimp_coordinates_callback):
	Make sure last_x and last_y are set to values that match
	those returned by gimp_size_entry_get_refval(),
	fixes bug #163951.
parent c4d65e75
2005-01-18 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* libgimpwidgets/gimpwidgets.c (gimp_coordinates_callback):
Make sure last_x and last_y are set to values that match
those returned by gimp_size_entry_get_refval(),
fixes bug #163951.
2005-01-18 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/dialogs/info-dialog.c: disconnect callbacks to prevent crash
......
......@@ -1078,20 +1078,24 @@ gimp_coordinates_callback (GtkWidget *widget,
if (new_x != gcd->last_x)
{
gcd->last_x = new_x;
gcd->last_y = new_y = (new_x * gcd->orig_y) / gcd->orig_x;
new_y = (new_x * gcd->orig_y) / gcd->orig_x;
g_signal_stop_emission_by_name (widget, "value_changed");
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 1,
new_y);
new_y);
gcd->last_y
= gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 1);
}
else if (new_y != gcd->last_y)
{
gcd->last_y = new_y;
gcd->last_x = new_x = (new_y * gcd->orig_x) / gcd->orig_y;
new_x = (new_y * gcd->orig_x) / gcd->orig_y;
g_signal_stop_emission_by_name (widget, "value_changed");
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 0,
new_x);
new_x);
gcd->last_x
= gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 0);
}
}
}
......@@ -1099,17 +1103,21 @@ gimp_coordinates_callback (GtkWidget *widget,
{
if (new_x != gcd->last_x)
{
gcd->last_y = new_y = gcd->last_x = new_x;
new_y = new_x;
g_signal_stop_emission_by_name (widget, "value_changed");
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 1, new_x);
gcd->last_y = gcd->last_x
= gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 1);
}
else if (new_y != gcd->last_y)
{
gcd->last_x = new_x = gcd->last_y = new_y;
new_x = new_y;
g_signal_stop_emission_by_name (widget, "value_changed");
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 0, new_y);
gcd->last_x = gcd->last_y
= gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 0);
}
}
}
......
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