fix xload function 28/18728/5
Antoine ELIAS [Wed, 30 Nov 2016 10:18:14 +0000 (11:18 +0100)]
Change-Id: I4dda2318d873a6765ff584c2e7686d909224c437

scilab/modules/graphics/macros/xload.sci

index f679021..fcb59c9 100644 (file)
@@ -20,17 +20,18 @@ function []=xload(fil,num)
     end
 
     if  argn(2)==2 then scf(num),end
-    f=gcf()
+    %__f__=gcf();
     res = execstr("load(fil)","errcatch") ;
     // Get latest figure created by load
     loadedFig = gcf();
     for kC=1:size(loadedFig.children, "*")
-        copy(loadedFig.children(kC), f); // Copy axes
+        copy(loadedFig.children(kC), %__f__); // Copy axes
     end
+    delete(%__f__.children($));
     delete(loadedFig); // Delete it, returned figure will be the one set as current by xload
     if res==0 then
-        f.visible="on"
-        f.immediate_drawing="on";
+        %__f__.visible="on"
+        %__f__.immediate_drawing="on";
     else
         error("Given file is not a graphic one") ;
     end