[gimp] libgimpwidgets: in GimpChainButton, emit "toggled" signal when "active" changes



commit c0c055b4e975e7524051e6b5b96a6eda0ac30d34
Author: Ell <ell_se yahoo com>
Date:   Fri Feb 8 08:07:05 2019 -0500

    libgimpwidgets: in GimpChainButton, emit "toggled" signal when "active" changes
    
    In GimpChainButton, emit the "toggled" signal whenever the chain
    button's "active" property changes, either due to user interaction,
    or programatically.  Previously, it would only get emitted when the
    button was actually clicked.
    
    In particular, this fixes an issue where the aspect ratio of a
    coordinates size-entry won't get updated when its chain button got
    toggled programatically, as can happen with the scale tool.

 libgimpwidgets/gimpchainbutton.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgimpwidgets/gimpchainbutton.c b/libgimpwidgets/gimpchainbutton.c
index fa90f44172..98083f910b 100644
--- a/libgimpwidgets/gimpchainbutton.c
+++ b/libgimpwidgets/gimpchainbutton.c
@@ -393,6 +393,8 @@ gimp_chain_button_set_active (GimpChainButton  *button,
 
       gimp_chain_button_update_image (button);
 
+      g_signal_emit (button, gimp_chain_button_signals[TOGGLED], 0);
+
       g_object_notify (G_OBJECT (button), "active");
     }
 }
@@ -447,8 +449,6 @@ gimp_chain_button_clicked_callback (GtkWidget       *widget,
   GimpChainButtonPrivate *private = GET_PRIVATE (button);
 
   gimp_chain_button_set_active (button, ! private->active);
-
-  g_signal_emit (button, gimp_chain_button_signals[TOGGLED], 0);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]