Sigbuilder block was opening two figures when asked to launch graphic window 38/10638/2
Alexandre HERISSE [Thu, 28 Feb 2013 14:34:50 +0000 (15:34 +0100)]
Change-Id: I82e643d6d0c2bb062f355504570f9ad1d0e88412

scilab/modules/scicos_blocks/macros/Sources/CURVE_c.sci

index 3f09d19..703951a 100644 (file)
@@ -93,16 +93,13 @@ select job
        ipar=[N;mtd;PO];
        rpar=[];
 
-        if ~exists('curwin') then
-         gh = gcf();
-         curwin = gh.figure_id
-        end
-
-        save_curwin = curwin;
-        curwin = max(winsid())+1; //** prepare a brand new win 
-         //** see below in this file; "poke_point" is very similar to "edit_curv"
-        [orpar,oipar,ok] = poke_point(xy,ipar,rpar); //** HERE WE ARE +++++++++++++++++++++++++++++++++++  
-       curwin = save_curwin;
+       if (winsid() == []) then
+         curwin = 0;
+       else
+         curwin = max(winsid())+1; //** prepare a brand new win
+       end
+       //** see below in this file; "poke_point" is very similar to "edit_curv"
+       [orpar,oipar,ok] = poke_point(xy,ipar,rpar); //** HERE WE ARE +++++++++++++++++++++++++++++++++++
        if ~ok then break;end;//  exit without save
 
        // verifying the data change