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

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

[Octave-bug-tracker] [bug #39813] rectangle(..., 'Parent', hg) not worki


From: Rik
Subject: [Octave-bug-tracker] [bug #39813] rectangle(..., 'Parent', hg) not working for group objects
Date: Tue, 22 Oct 2013 15:51:03 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0

Update of bug #39813 (project octave):

                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #6:

Pantxo,

I applied your patch for newplot and __plt_get_axis__arg__.  To get everything
to work I had to modify the strategy a bit.  __plt_get_axis_arg__ now always
returns a valid axis handle in the first position, and any other handles, such
as an hggroup handle, come afterwards.  This keeps existing routines working. 
newplot() was modified to accept a vector of handles instead of just a single
handle.  I also copied the code that searches for handles to save from the
"replace" case to the "replacechildren" case as well since that seemed
reasonable.  Finally, with those changes in place I was able to fix this bug. 
The three changesets are
<http://hg.savannah.gnu.org/hgweb/octave/rev/ed9a21a90221>,
<http://hg.savannah.gnu.org/hgweb/octave/rev/1ab8e21d9cfc>,
<http://hg.savannah.gnu.org/hgweb/octave/rev/f0bc865db55f>.

Final question, did you test the save handle code in newplot against Matlab? 
The current code saves uncles, as well as parents, along the tree from the
toplevel figure down to a saved handle.  It seems more reasonable, although
perhaps harder to code, to save only the direct path from figure down to saved
handle.

Using the test code from newplot that you wrote:


hf = figure;
hax = axes ();
hold on;
hg1 = hggroup ();
hg2 = hggroup ("parent", hg1);
li0 = line (1:10, 1:10);
li1 = line (1:10, -1:-1:-10, "parent", hg1);
li2 = line (1:10, sin (1:10), "parent", hg2);
hold off;
newplot (hg2);


Does li1 exist at this point [ishandle (li1)] since it is an uncle to hg2?  Or
does the Matlab newplot keep only hf->hax->hg1->hg2.  And does Matlab newplot
preserve the children of the saved handle [ishandle (li2)] or just the actual
named handle li2 and its parents?



    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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