Mercurial > octave
changeset 27755:b70da79e4ed9
legend.m: Fix storage of listeners for displayname property
* legend.m: Don't initialize "__listeners__" appdata with empty cell, since it
erases already stored listeners.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Fri, 29 Nov 2019 10:41:03 +0100 |
parents | 0a9213395844 |
children | bd40796683d8 |
files | scripts/plot/appearance/legend.m |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m Fri Nov 29 10:32:15 2019 +0100 +++ b/scripts/plot/appearance/legend.m Fri Nov 29 10:41:03 2019 +0100 @@ -226,8 +226,6 @@ ## Listeners to foreign objects properties are stored for later ## deletion in "delfunction" - setappdata (hl, "__listeners__", {}); - hax = opts.axes_handles(1); hf = ancestor (hax, "figure"); @@ -997,8 +995,7 @@ addlistener (hmarker, "markersize", @update_marker_cb); endif - add_safe_listener (hl, hplt, "displayname", ... - {@update_displayname_cb, hl}); + add_safe_listener (hl, hplt, "displayname", {@update_displayname_cb, hl}); endif objlist(ii,:) = [htxt, hitem];