octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #57391] graphics callback error after two cons


From: Rik
Subject: [Octave-bug-tracker] [bug #57391] graphics callback error after two consecutive calls to "stem"
Date: Tue, 10 Dec 2019 17:43:39 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #57391 (project octave):

                  Status:               Confirmed => Ready For Test         

    _______________________________________________________

Follow-up Comment #2:

The problem is that when deleting the hggroup (which is called when newplot
deletes all children of the current axes) the "xlim" property changes from [0,
10] to [0, 1].  I don't know why this needs to happen.  It may be that the
axes are set to auto-update as data is added or removed and removing the
hggroup removes all data so that the limits go back to their default of [0,
1].  In any case, the change in xlim causes the listener on that axes property
to fire and call the stem function update_xlim.  I was able to suppress the
error by checking whether the hggroup was in the process of being deleted. 
See the code below.


function update_xlim (h, ~)

  kids = get (h, "children");
  xlim = get (h, "xlim");

  for i = 1 : length (kids)
    obj = get (kids(i));
    if (strcmp (obj.type, "hggroup") && isfield (obj, "baseline")
->      && ! strcmp (obj.beingdeleted, "on"))
      if (any (get (obj.baseline, "xdata") != xlim))
        set (obj.baseline, "xdata", xlim);
      endif
    endif
  endfor


I checked in this patch here:
https://hg.savannah.gnu.org/hgweb/octave/rev/f78dc0d6ad2d.

Marking as Ready for Test.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57391>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]