[xiph-commits] r12280 - trunk/sushivision

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Jan 1 13:42:24 PST 2007


Author: xiphmont
Date: 2007-01-01 13:42:23 -0800 (Mon, 01 Jan 2007)
New Revision: 12280

Modified:
   trunk/sushivision/panel-2d.c
Log:
Bring legend handling in line with the 1d panels, fixing a few update bugs along the way



Modified: trunk/sushivision/panel-2d.c
===================================================================
--- trunk/sushivision/panel-2d.c	2007-01-01 21:05:48 UTC (rev 12279)
+++ trunk/sushivision/panel-2d.c	2007-01-01 21:42:23 UTC (rev 12280)
@@ -85,25 +85,6 @@
   }
 }
 
-static void _sushiv_panel2d_map_redraw(sushiv_panel_t *p){
-  Plot *plot = PLOT(p->private->graph);
-
-  gdk_threads_enter (); // misuse me as a global mutex
-  
-  _sushiv_panel2d_remap(p);
-  if(plot)
-    plot_expose_request(plot);
- 
-  gdk_threads_leave (); // misuse me as a global mutex
-}
-
-static void _sushiv_panel2d_legend_redraw(sushiv_panel_t *p){
-  Plot *plot = PLOT(p->private->graph);
-
-  if(plot)
-    plot_draw_scales(plot);
-}
-
 static void update_legend(sushiv_panel_t *p){  
   sushiv_panel2d_t *p2 = p->subtype->p2;
   Plot *plot = PLOT(p->private->graph);
@@ -160,12 +141,31 @@
       }
     }
     gdk_threads_leave ();
+  }
+}
 
-    _sushiv_panel_dirty_legend(p);
+static void _sushiv_panel2d_map_redraw(sushiv_panel_t *p){
+  Plot *plot = PLOT(p->private->graph);
 
-  }
+  gdk_threads_enter (); // misuse me as a global mutex
+  
+  _sushiv_panel2d_remap(p);
+  if(plot)
+    plot_expose_request(plot);
+ 
+  gdk_threads_leave (); // misuse me as a global mutex
 }
 
+static void _sushiv_panel2d_legend_redraw(sushiv_panel_t *p){
+  Plot *plot = PLOT(p->private->graph);
+
+  gdk_threads_enter (); // misuse me as a global mutex
+    update_legend(p);
+  if(plot)
+    plot_draw_scales(plot);
+  gdk_threads_leave (); // misuse me as a global mutex
+}
+
 static void mapchange_callback_2d(GtkWidget *w,gpointer in){
   sushiv_objective_list_t *optr = (sushiv_objective_list_t *)in;
   //sushiv_objective_t *o = optr->o;
@@ -183,7 +183,7 @@
   slider_draw(p2->range_scales[onum]);
   slider_expose(p2->range_scales[onum]);
     
-  update_legend(p);
+  _sushiv_panel_dirty_legend(p);
 
   //redraw the plot
   _sushiv_panel_dirty_map(p);
@@ -601,7 +601,7 @@
   
   plot_set_crosshairs(plot,x,y);
   _sushiv_panel1d_update_linked_crosshairs(p,0,0); 
-  update_legend(p);
+  _sushiv_panel_dirty_legend(p);
 }
 
 static void center_callback_2d(sushiv_dimension_list_t *dptr){
@@ -832,10 +832,9 @@
       if(p2->completed_lines==h){ 
 	_sushiv_panel_dirty_legend(p);
 	plot_expose_request(plot);
-      }else
+      }else{
 	plot_expose_request_line(plot,y);
-      
-
+      }
     }
   }
    



More information about the commits mailing list