comparison scripts/plot/util/copyobj.m @ 20089:f25fe5369022

Don't assume axes parent is a figure (bug #44394) * axis.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")" * legend.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")" * colorbar.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")" * copyobj.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")" * hold.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")" * ishold.m: use "ancestor (ca, "figure")" in place of "get (ca, "parent")"
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sun, 01 Mar 2015 15:10:28 +0100
parents 4197fc428c7d
children
comparison
equal deleted inserted replaced
20088:2350fc8ba960 20089:f25fe5369022
63 hnew = struct2hdl (str, hparent); 63 hnew = struct2hdl (str, hparent);
64 endif 64 endif
65 65
66 ## reset current figure (and eventually axes) to original 66 ## reset current figure (and eventually axes) to original
67 set (0, "currentfigure", cf); 67 set (0, "currentfigure", cf);
68 if (get (hnew, "parent") == cf && ! isempty (ca)) 68 if (ancestor (hnew, "figure") == cf && ! isempty (ca))
69 set (cf, "currentaxes", ca) 69 set (cf, "currentaxes", ca)
70 endif 70 endif
71 71
72 endfunction 72 endfunction
73 73