bugGNU Octave - Bugs: bug #57241, after copyobj, labels behave...

 
 

bug #57241: after copyobj, labels behave strange

Submitter:  Muhali <muhali>
Submitted:  Fri 15 Nov 2019 02:10:09 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 6.1.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 21 Dec 2020 06:24:25 PM UTC, comment #6: 

Pantxo's patch works well.  I looked at the hidden properties in graphics.in.h and the only ones I thought might be worth copying were "__appdata__" and "__guidata__".  However, I checked with Matlab and copyobj does not copy application data and hasn't since R2014b.  If you want that old behavior you have to specify 'legacy' to copyobj().  It doesn't seem like it is worth making a special case just to handle legacy behavior.

Marking bug as fixed and closing report.

Rik <rik5>
Group administrator
Sun 20 Dec 2020 01:26:10 PM UTC, comment #5: 

I pushed your patches to the stable branch here:
https://hg.savannah.gnu.org/hgweb/octave/rev/9ec07d894070
https://hg.savannah.gnu.org/hgweb/octave/rev/21dddfdaa636

Marking as ready for test.

Markus Mützel <mmuetzel>
Group administrator
Fri 18 Dec 2020 08:50:53 PM UTC, comment #4: 

After the patch from comment #3, we could make use of the current graphics toolkit to test hgsave.

(file #50516)

Pantxo Diribarne <pantxo>
Group Member
Fri 18 Dec 2020 08:20:28 PM UTC, comment #3: 

I attached a simple patch that fixes both this bug and its two duplicates, bug #59346 and bug #59648.

I don't have time to search carefully, but there are probably other hidden properties than the ones I added that would deserve to be stored.

(file #50514)

Pantxo Diribarne <pantxo>
Group Member
Sun 25 Oct 2020 10:00:17 PM UTC, comment #2: 

Note that this issue prevents the tests for hgsave from passing using the default Qt toolkit.

Pantxo Diribarne <pantxo>
Group Member
Fri 15 Nov 2019 10:51:12 PM UTC, comment #1: 

Confirmed.  I tested and found the same behavior on the development branch.  The copyobj() call is somehow a part of the problem.  If I delete and recreate the ylabel text object then it will behave correctly.


axes (ax2);
delete (get (ax2, "ylabel"));
ylabel ("Y_label");
hl = get (ax2, "ylabel");
set (hl, "orientation", 90);



Rik <rik5>
Group administrator
Fri 15 Nov 2019 02:10:09 PM UTC, original submission:  


ax1 = subplot(2,1,1) ;
ylabel('y')
ax2 = copyobj(ax1, gcf);
set(ax2, 'position', [0.2 0.1 0.5 0.2])
ylim(ax2, [0.2 0.4])


After the ylim command, the label wanders away.

Muhali <muhali>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #50516:  test_hgsave_qt.patch added by pantxo (1KiB - text/x-patch)
file #50514:  bug57241.patch added by pantxo (1018B - text/x-patch)

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by muhali (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-12-21 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2020-12-20 mmuetzel StatusPatch Submitted Ready For Test
        Releasedev 6.1.0
        Operating SystemGNU/Linux Any
    2020-12-18 pantxo Attached File- Added test_hgsave_qt.patch, #50516
    2020-12-18 pantxo Attached File- Added bug57241.patch, #50514
        StatusConfirmed Patch Submitted
    2020-12-18 rik5 Dependencies- bugs #59648 is dependent
    2020-10-25 pantxo Dependencies- bugs #59346 is dependent
    2019-11-15 rik5 StatusNone Confirmed
        Release5.1.0 dev

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code