# HG changeset patch # User Rik # Date 1525096532 25200 # Node ID c8fc547ab5dd07129c444924d869924afeb41f29 # Parent c5c0ee1b74431753e1d201a0e08f9626626bad5b Fix extra figure window pop-up when using waitbar (bug #53778) * patch.m, surface.m: Call "ishold (hax)" rather than "ishold ()" so that function makes the correct determination about current axes and figure. diff -r c5c0ee1b7443 -r c8fc547ab5dd scripts/plot/draw/patch.m --- a/scripts/plot/draw/patch.m Fri Apr 27 14:55:12 2018 -0400 +++ b/scripts/plot/draw/patch.m Mon Apr 30 06:55:32 2018 -0700 @@ -89,10 +89,11 @@ print_usage (); endif - ## FIXME: This is a hack to get 'layer' command to work for 2D patches - ## Alternative is much more complicated surgery in graphics.cc. - ## of get_children_limits() for 'z' axis and 'patch' object type. - if (! ishold ()) + ## FIXME: ishold called this way is very slow. + if (! ishold (hax)) + ## FIXME: This is a hack to get 'layer' command to work for 2D patches + ## Alternative is much more complicated surgery in graphics.cc. + ## of get_children_limits() for 'z' axis and 'patch' object type. if (isempty (get (htmp, "zdata"))) set (hax, "zlim", [-1 1]); endif diff -r c5c0ee1b7443 -r c8fc547ab5dd scripts/plot/draw/surface.m --- a/scripts/plot/draw/surface.m Fri Apr 27 14:55:12 2018 -0400 +++ b/scripts/plot/draw/surface.m Mon Apr 30 06:55:32 2018 -0700 @@ -189,7 +189,8 @@ h = __go_surface__ (ax, "xdata", x, "ydata", y, "zdata", z, "cdata", c, other_args{:}); - if (! ishold ()) + ## FIXME: ishold called this way is very slow. + if (! ishold (ax)) set (ax, "view", [0, 90]); endif