changeset 28389:38ebf4885e0f stable

plotyy.m: leave positionconstraint unchanged after position updates (bug #58470) * plotyy.m (update_prop): Save/restore positionconstraint property.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Mon, 01 Jun 2020 00:58:03 +0200
parents 56e7b2bb1dc6
children f3200b8cff19 0824d92a449d
files scripts/plot/draw/plotyy.m
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/draw/plotyy.m	Mon Jun 01 09:05:16 2020 -0700
+++ b/scripts/plot/draw/plotyy.m	Mon Jun 01 00:58:03 2020 +0200
@@ -232,7 +232,13 @@
     unwind_protect
       recursion = true;
       val = get (h, prop);
-      set (ax2, prop, get (h, prop));
+      if (strcmpi (prop, "position") || strcmpi (prop, "outerposition"))
+        ## Save/restore "positionconstraint"
+        constraint = get (ax2, "activepositionproperty");
+        set (ax2, prop, get (h, prop), "activepositionproperty", constraint);
+      else
+        set (ax2, prop, get (h, prop));
+      endif
     unwind_protect_cleanup
       recursion = false;
     end_unwind_protect