From b1bbbb230dd2e1bee62f4c06b5dee4e95468702b Mon Sep 17 00:00:00 2001 From: Massimo Valentini Date: Wed, 5 Aug 2009 23:40:39 +0200 Subject: [PATCH] =?UTF-8?q?Bug=20542003=20=E2=80=93=20Reset=20button=20bre?= =?UTF-8?q?aks=20field=20updates=20on=20width=20and=20height=20boxes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update all of the internal state in response to a reset request. --- libgimpwidgets/gimppropwidgets.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libgimpwidgets/gimppropwidgets.c b/libgimpwidgets/gimppropwidgets.c index ed6fef3c44..ce320a40db 100644 --- a/libgimpwidgets/gimppropwidgets.c +++ b/libgimpwidgets/gimppropwidgets.c @@ -3155,12 +3155,21 @@ gimp_prop_coordinates_notify_x (GObject *config, if (value != gimp_size_entry_get_refval (entry, 0)) { + gdouble *old_x_value = g_object_get_data (G_OBJECT (entry), + "old-x-value"); + g_signal_handlers_block_by_func (entry, gimp_prop_coordinates_callback, config); gimp_size_entry_set_refval (entry, 0, value); + if (old_x_value) + *old_x_value = value; + + g_signal_emit_by_name (entry, "value-changed", + gimp_size_entry_get_value (entry, 0)); + g_signal_handlers_unblock_by_func (entry, gimp_prop_coordinates_callback, config); @@ -3193,12 +3202,21 @@ gimp_prop_coordinates_notify_y (GObject *config, if (value != gimp_size_entry_get_refval (entry, 1)) { + gdouble *old_y_value = g_object_get_data (G_OBJECT (entry), + "old-y-value"); + g_signal_handlers_block_by_func (entry, gimp_prop_coordinates_callback, config); gimp_size_entry_set_refval (entry, 1, value); + if (old_y_value) + *old_y_value = value; + + g_signal_emit_by_name (entry, "value-changed", + gimp_size_entry_get_value (entry, 1)); + g_signal_handlers_unblock_by_func (entry, gimp_prop_coordinates_callback, config);