# HG changeset patch # User Guillaume Flandin # Date 1564436320 25200 # Node ID 301186dbef682ffdfe779953314dec4e13ede0d8 # Parent 6ec7b2e73b5bda562c9b1504cabcb8552d053505 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. diff -r 6ec7b2e73b5b -r 301186dbef68 scripts/plot/util/struct2hdl.m --- 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