[xiph-commits] r12255 - trunk/sushivision

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Thu Dec 28 12:49:58 PST 2006


Author: xiphmont
Date: 2006-12-28 12:49:56 -0800 (Thu, 28 Dec 2006)
New Revision: 12255

Modified:
   trunk/sushivision/panel-1d.c
Log:
Correct garbage in pane when 1d data vector is resized



Modified: trunk/sushivision/panel-1d.c
===================================================================
--- trunk/sushivision/panel-1d.c	2006-12-28 20:41:25 UTC (rev 12254)
+++ trunk/sushivision/panel-1d.c	2006-12-28 20:49:56 UTC (rev 12255)
@@ -391,6 +391,7 @@
   int dw = w;
   sushiv_panel_t *link = (p1->link_x ? p1->link_x : p1->link_y);
   sushiv_panel2d_t *p2 = (link?link->subtype->p2:NULL);
+  int i,j;
 
   if(p1->link_x){
     dw = p2->data_w;
@@ -445,19 +446,20 @@
     p1->panel_h = h;
     
     if(!p1->data_vec){
-      int i,j;
       // allocate it
 
       p1->data_vec = calloc(p->objectives,sizeof(*p1->data_vec));
       for(i=0;i<p->objectives;i++)
 	p1->data_vec[i] = malloc(dw*sizeof(**p1->data_vec));
       
-      // blank it 
-      for(i=0;i<p->objectives;i++)
-	for(j=0;j<dw;j++)
-	  p1->data_vec[i][j]=NAN;
     }
 
+    // blank it 
+    for(i=0;i<p->objectives;i++)
+      for(j=0;j<dw;j++)
+	p1->data_vec[i][j]=NAN;
+    _sushiv_panel1d_map_redraw(p);
+
     p1->serialno++;
     p1->last_line = 0;
     _sushiv_wake_workers();



More information about the commits mailing list