Fix BARXY simulation : must use uid instead of label + increase speed 17/14117/1
Bruno JOFRET [Tue, 25 Mar 2014 07:49:06 +0000 (08:49 +0100)]
Change-Id: I92027e4927bfdb438f707aa1e45142b07bdd9426

scilab/modules/scicos_blocks/macros/Sinks/BARXY_sim.sci

index e66750e..dfd1c29 100644 (file)
@@ -15,17 +15,16 @@ function block=BARXY_sim(block,flag)
     if flag == 4 | flag == 6
         // Initialisation || Re-Init
         // if already exists (stopped) then reuse
-        f = findobj("Tag", block.label);
+        f = findobj("Tag", block.uid);
         if f == [] then
-            f = figure("Tag", block.label, "Figure_name", "BARXY");
+            f = figure("Tag", block.uid, "Figure_name", "BARXY");
         else
             scf(f);
+            clf();
         end
-        // Create an empty figure without Menu's nor toolbar
-        clf();
+
         f.background = -2;
         a=gca();
-        drawlater();
         a.data_bounds = block.rpar';
         a.isoview = "on";
         u1=block.inptr(1);
@@ -41,12 +40,11 @@ function block=BARXY_sim(block,flag)
         u1=block.inptr(1);
         u2=block.inptr(2);
 
-        f = findobj("Tag", block.label);
-        a = f.children;
+        f = findobj("Tag", block.uid);
 
-        drawlater()
+        a = f.children;
         a.children(1).data = [u1, u2]
-        drawnow();
+
     end
 
 endfunction
\ No newline at end of file