changeset 27300:301186dbef68

struct2hdl.m: Add capability to restore uicontextmenus (bug #44670). * struct2hdl.m: After creating a uicontextmenu, use the "special" field of the struct to attach it to the required parent objects.
author Guillaume Flandin <guillaume.offline@gmail.com>
date Mon, 29 Jul 2019 14:38:40 -0700
parents 6ec7b2e73b5b
children a2b1ba6c92d5
files scripts/plot/util/struct2hdl.m
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/struct2hdl.m	Mon Jul 29 09:11:03 2019 -0700
+++ b/scripts/plot/util/struct2hdl.m	Mon Jul 29 14:38:40 2019 -0700
@@ -172,6 +172,9 @@
       s.properties = rmfield (s.properties, "extent");
     endif
     [h, s] = createui (s, par);
+    if (strcmp (s.type, "uicontextmenu"))
+      set (p(2, ismember (p(1,:), s.special)), 'UIContextMenu', h);
+    endif
   else
     error ("struct2hdl: %s objects are not implemented yet", s.type);
   endif