[xiph-commits] r12931 - trunk/sushivision

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Tue May 8 08:59:18 PDT 2007


Author: xiphmont
Date: 2007-05-08 08:59:18 -0700 (Tue, 08 May 2007)
New Revision: 12931

Modified:
   trunk/sushivision/dimension.c
Log:
correct more dimension cross-panel update bugs



Modified: trunk/sushivision/dimension.c
===================================================================
--- trunk/sushivision/dimension.c	2007-05-08 11:37:30 UTC (rev 12930)
+++ trunk/sushivision/dimension.c	2007-05-08 15:59:18 UTC (rev 12931)
@@ -249,6 +249,9 @@
     
     d->val = val;
     
+    if(d->private->value_callback) 
+      d->private->value_callback(d,d->private->value_callback_data);
+
     /* dims can be shared amongst multiple widgets; all must be updated */
     for(i=0;i<d->private->widgets;i++){
       _sv_dim_widget_t *w = d->private->widget_list[i];
@@ -259,11 +262,9 @@
     /* dims can be shared amongst multiple widgets; all must get callbacks */
     for(i=0;i<d->private->widgets;i++){
       _sv_dim_widget_t *w = d->private->widget_list[i];
-      w->center_callback(d->private->widget_list[i]->dl);
+      w->center_callback(w->dl);
     }
 
-    if(d->private->value_callback) 
-      d->private->value_callback(d,d->private->value_callback_data);
   }
   
   if(buttonstate == 2)
@@ -316,7 +317,7 @@
     /* dims can be shared amongst multiple widgets; all must get callbacks */
     for(i=0;i<d->private->widgets;i++){
       _sv_dim_widget_t *w = d->private->widget_list[i];
-      w->bracket_callback(dw->dl);
+      w->bracket_callback(w->dl);
     }
   }
   
@@ -353,6 +354,9 @@
     d->bracket[0] = val;
     d->bracket[1] = val;
     
+    if(d->private->value_callback) 
+      d->private->value_callback(d,d->private->value_callback_data);
+
     /* dims can be shared amongst multiple widgets; all must be updated */
     for(i=0;i<d->private->widgets;i++){
       _sv_dim_widget_t *w = d->private->widget_list[i];
@@ -363,12 +367,9 @@
     /* dims can be shared amongst multiple widgets; all must get callbacks */
     for(i=0;i<d->private->widgets;i++){
       _sv_dim_widget_t *w = d->private->widget_list[i];
-      w->center_callback(dw->dl);
+      w->center_callback(w->dl);
     }
 
-    if(d->private->value_callback) 
-      d->private->value_callback(d,d->private->value_callback_data);
-
   }
   _sv_undo_resume(p->sushi);
   
@@ -653,7 +654,7 @@
     d->private->widget_list = calloc (1, sizeof(*d->private->widget_list));
   }else{
     d->private->widget_list = realloc (d->private->widget_list,
-				       d->private->widgets+1 * sizeof(*d->private->widget_list));
+				       (d->private->widgets+1) * sizeof(*d->private->widget_list));
   }
   d->private->widget_list[d->private->widgets] = dw;
   d->private->widgets++;



More information about the commits mailing list