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

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

[Octave-bug-tracker] [bug #39371] addproperty fails for "axesunits" type


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #39371] addproperty fails for "axesunits" type
Date: Tue, 08 Oct 2013 22:10:37 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0

Follow-up Comment #8, bug #39371 (project octave):

First of all this bug happens for any kind of axes property (not only
"axesunits")

To clone a particular property <TYPE><PROP> (such as axesunits here), an
orphan dummy object of type TYPE is created and stored for further use (see
dprop_map).

The first time you call addproperty a new axes is created to clone its "units"
property: one of the initialization stages (get_boundingbox) requires
retrieving parent figure bounding box, but the axes has no valid parent
figure.

The second time, the dummy axes already exists and the error does not occur.

Attached is a patch that "fixes" this issue: if the axes parent is invalid,
default_figure_position () is used to compute the axes bounding box.

It happens that only axes objects seams to require informations about their
parent but it could be the case for other objects. A more robust way of fixing
this maybe to build a proper figure tree (in dprop_map) instead of individual
objects.  

(file #29332)
    _______________________________________________________

Additional Item Attachment:

File name: fix_invalid_object_39371.diff  Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39371>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

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