Author: post
Date: 2011-03-06 16:43:00 +0100 (Sun, 06 Mar 2011)
New Revision: 3839

Modified:
   trunk/src/rs-toolbox.c
Log:
Update sliders when resetting whitebalance.

Modified: trunk/src/rs-toolbox.c
===================================================================
--- trunk/src/rs-toolbox.c      2011-03-06 14:29:08 UTC (rev 3838)
+++ trunk/src/rs-toolbox.c      2011-03-06 15:43:00 UTC (rev 3839)
@@ -328,13 +328,23 @@
        g_assert(basic != NULL);
        g_assert(RS_IS_TOOLBOX(toolbox));
 
-       if (toolbox->photo)
-               
rs_object_class_property_reset(G_OBJECT(toolbox->photo->settings[snapshot]), 
basic->property_name);
-
+       gint mask = 0;
+       
+       if (g_strcmp0(basic->property_name, "dcp-temp") == 0)
+               mask |= MASK_DCP_TEMP;
+       if (g_strcmp0(basic->property_name, "dcp-tint") == 0)
+               mask |= MASK_DCP_TINT;
+       
        /* If we reset warmth or tint slider, we go back to camera whitebalance 
*/
-       if (g_strcmp0(basic->property_name, "dcp-temp") == 0 || 
g_strcmp0(basic->property_name, "dcp-tint") == 0)
+       if (toolbox->photo && 0 != mask)
+       {
                rs_photo_set_wb_from_camera(toolbox->photo, snapshot);
+               photo_settings_changed(toolbox->photo, MASK_WB|(snapshot<<24), 
toolbox);
+       }
+       else if (toolbox->photo)
+               
rs_object_class_property_reset(G_OBJECT(toolbox->photo->settings[snapshot]), 
basic->property_name);
 
+
        return TRUE;
 }
 


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to