bugGNU Octave - Bugs: bug #59827, Using set (h, 'CData', data) no...

 
 

bug #59827: Using set (h, 'CData', data) no longer works for uicontrol pushbutton objects

Submitter:  None
Submitted:  Tue 05 Jan 2021 07:11:39 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 07 Jan 2021 05:53:18 PM UTC, comment #6: 

I figured out the problem and checked in a solution here: http://hg.savannah.gnu.org/hgweb/octave/rev/486ff0874d68.  This passes the test code in comment #2 and the attached script SaveOpenCdataProblem.m

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Wed 06 Jan 2021 10:01:37 PM UTC, comment #5: 

I used 'hg bisect' to find the changeset that introduced the regression.  It was a one-line change to setIconSize().  I can't just revert it because it will re-introduce another bug.  I'm going to investigate a bit more with the debugger.

Rik <rik5>
Group administrator
Tue 05 Jan 2021 10:41:58 PM UTC, comment #4: 

Marking as a regression.  This works correctly in 5.2 and 6.1, but not on the development branch.  Something must be interfering and preventing the calls to update() in libgui/graphics/PushButtonControl.cc.

Rik <rik5>
Group administrator
Tue 05 Jan 2021 09:43:13 PM UTC, comment #3: 

The fact that using set() with the 'CData' property does not color the pushbutton correctly is the reason why openfig() also fails.

I have re-titled the bug report to the root issue.

Rik <rik5>
Group administrator
Tue 05 Jan 2021 10:25:19 AM UTC, comment #2: 

Confirmed with current dev. The issue is actually whether CData is provided when creating the uicontrol or when using set().


f = figure ();
icon = rand(16, 16, 3);

uicontrol ("style", "pushbutton", "position", [10 10 32 32], "cdata", icon);

h = uicontrol ("style", "pushbutton", "position", [50 10 32 32]);
set (h, "cdata", icon)


Guillaume <gyom>
Tue 05 Jan 2021 07:55:51 AM UTC, comment #1: 

Apologies - I linked the wrong bug. I meant #58144 of course.

Anonymous
Tue 05 Jan 2021 07:11:39 AM UTC, original submission:  

Hello,
I'm having a bit of a problem with the CData property of a pushbutton. I've assigned a CData, and when I save the figure and open it again (savefig - openfig), the CData is not displayed anymore. The property still contains the correct CData though, it's just not visible.
I've attached a minimal example.
It could possibly related to bug #58114, because
- it doesn't show up in the 6.1 release under Windows
- it doesn't show up in a dev version pulled in March 2020
- it does show up in the dev version pulled in May 2020 (which I am using), where that CData bug is fixed.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #50656:  SaveOpenCDataProblem.m added by None (188B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by gyom (Posted a comment)
  • -email is unavailable- added by None (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-07 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2021-01-05 rik5 Item GroupIncorrect Result Regression
        SummaryUsing set (h, 'CData', data) does not work for uicontrol pushbutton objects Using set (h, 'CData', data) no longer works for uicontrol pushbutton objects
    2021-01-05 rik5 CategoryNone Plotting with OpenGL
        Item GroupInaccurate Result Incorrect Result
        StatusNone Confirmed
        SummaryCData of pushbutton not visible after savefig() and openfig() Using set (h, 'CData', data) does not work for uicontrol pushbutton objects
    2021-01-05 None Attached File- Added SaveOpenCDataProblem.m, #50656

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code