changeset 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 94c7b2252490
children 031eaa90064e
files scripts/plot/util/print.m
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/print.m	Thu Oct 24 21:20:35 2013 +0200
+++ b/scripts/plot/util/print.m	Thu Oct 24 13:17:13 2013 -0700
@@ -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