Mercurial > hg > octave-nkf
changeset 15799:d0579fed7e22
struct2hdl.m: Set the "position" and "outerposition" properties in the
order implied by "activepositionproperty". (Bug # 37913)
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sun, 16 Dec 2012 19:14:20 -0500 |
parents | ac9e34f83522 |
children | d9b8333df5e4 |
files | scripts/plot/struct2hdl.m |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/struct2hdl.m +++ b/scripts/plot/struct2hdl.m @@ -92,12 +92,23 @@ p = p(1:2, 1:(tst(end)-1)); endif - ## Place the "*mode" properties as the end to avoid have the updaters - ## change the mode to "manual" when the value is "auto" + ## Place the "*mode" properties as the end to avoid having the updaters + ## change the mode to "manual" when the value is "auto". names = fieldnames (s.properties); n = strncmp (cellfun (@fliplr, names, "uniformoutput", false), "edom", 4); n = (n | strcmp (names, "activepositionproperty")); names = [names(!n); names(n)]; + if (strcmp (s.type, "axes")) + n_pos = find (strcmp (names, "position") | strcmp (names, "outerposition")); + if (strcmp (s.properties.activepositionproperty, "position")) + names{n_pos(1)} = "outerposition"; + names{n_pos(2)} = "position"; + else + names{n_pos(1)} = "position"; + names{n_pos(2)} = "outerposition"; + endif + endif + ## Reorder the properties with the mode properties coming last s.properties = orderfields (s.properties, names); ## create object