# HG changeset patch # User Ben Abbott # Date 1371879483 -28800 # Node ID 56102c33122d36e13357bcf68cf8d2f0230bca97 # Parent 286904321282c795254b6862291a6d5d43bd2488 Fix problems with changeset 286904321282. legend.m: Do not delete invisible legend text object. Fix typo. diff --git a/scripts/plot/legend.m b/scripts/plot/legend.m --- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -511,7 +511,7 @@ if (isempty (hplots)) if (! isempty (hlegend)) fkids = get (fig, "children"); - delete_legend (fkids(fkids == hlegend)); + delete (fkids(fkids == hlegend)); hlegend = []; hobjects = []; hplots = []; @@ -869,13 +869,8 @@ props = {"parent", ca(1), "tag", "legend", ... "handlevisibility", "off", "visible", "off", ... "xliminclude", "off", "yliminclude", "off"}; - t1 = findall (ca(1), props{:}, "type", "text"); + t1 = findall (ca(1), props{3:4}, "type", "text"); if (isempty (t1)) - ht = findall (ca(1), "type", "text", props{3:end}); - if (! isempty (ht)) - set (ht, "deletefcn", "") - delete (ht); - endif t1 = text (0, 0, "", props{:}); set (t1, "deletefcn", {@deletelegend1, hlegend}); endif