From a538994a6687bacb708d9df2e9727a3b5412594a Mon Sep 17 00:00:00 2001 From: Alexandre HERISSE Date: Thu, 28 Feb 2013 15:34:50 +0100 Subject: [PATCH] Sigbuilder block was opening two figures when asked to launch graphic window Change-Id: I82e643d6d0c2bb062f355504570f9ad1d0e88412 --- .../scicos_blocks/macros/Sources/CURVE_c.sci | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/scilab/modules/scicos_blocks/macros/Sources/CURVE_c.sci b/scilab/modules/scicos_blocks/macros/Sources/CURVE_c.sci index 3f09d19..703951a 100644 --- a/scilab/modules/scicos_blocks/macros/Sources/CURVE_c.sci +++ b/scilab/modules/scicos_blocks/macros/Sources/CURVE_c.sci @@ -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 -- 1.7.9.5