Mercurial > hg > octave-nkf
diff scripts/plot/util/print.m @ 17751:e2f83152e64a
print.m: Restore figure position first (in pixels) and then original units.
* scripts/plot/util/print.m: Restore figure position first (in pixels) and then
original units.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 24 Oct 2013 13:17:13 -0700 |
parents | d63878346099 |
children | 13c80c3e9660 d6f1f46e5b8f |
line wrap: on
line diff
--- a/scripts/plot/util/print.m +++ b/scripts/plot/util/print.m @@ -425,7 +425,13 @@ unwind_protect_cleanup ## restore modified properties if (isstruct (props)) - for n = 1:numel (props) + ## Restore figure position and units first + for n = 2:-1:1 + if (ishandle (props(n).h)) + set (props(n).h, props(n).name, props(n).value{1}); + endif + endfor + for n = numel (props):-1:3 if (ishandle (props(n).h)) set (props(n).h, props(n).name, props(n).value{1}); endif