Manage xload 30/14230/1
Vincent COUVERT [Sun, 30 Mar 2014 14:10:54 +0000 (16:10 +0200)]
To test:
test_run graphics bug_3975 // xload
test_run graphics save_load // without xload

Change-Id: I5353c72bde95058bb05e170254d8daddface39a1

scilab/modules/io/macros/%_sodload.sci

index 5b9f5f3..ca5e546 100644 (file)
@@ -176,7 +176,14 @@ function %_sodload(%__filename__, varargin)
                 fields(fields=="default_axes") = [];
                 fields(fields=="visible") = [];
             else
-                h = gcf();
+                [lnums, fnames] = where();
+                ind = grep(fnames, "xload");
+                xload_mode = (ind ~= []);
+                if xload_mode then // See bug #3975
+                    h = gcf();
+                else
+                    h = scf();
+                end
                 h.visible = "off";
             end
         else