changeset 29255:216ef81dafb6 stable

struct2hdl.m: Set "units" property early. * scripts/plot/util/struct2hdl.m: Set "units" property before position properties.
author Markus Mützel <markus.muetzel@gmx.de>
date Mon, 04 Jan 2021 14:19:48 +0100
parents 37584021e209
children e818ceb2a74e 87ca5976c648
files scripts/plot/util/struct2hdl.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/struct2hdl.m	Sat Jan 02 19:27:08 2021 +0100
+++ b/scripts/plot/util/struct2hdl.m	Mon Jan 04 14:19:48 2021 +0100
@@ -120,7 +120,10 @@
       names{n_pos(2)} = "outerposition";
     endif
   endif
-  ## Reorder the properties with the mode properties coming last
+  ## Set "units" property early
+  n = strcmp (names, "units");
+  names = [names(n); names(! n)];
+  ## Reorder the properties
   s.properties = orderfields (s.properties, names);
 
   ## Silence deprecation warnings