Fix BARXY simulation : must use uid instead of label + increase speed
[scilab.git] / 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