bugGNU Octave - Bugs: bug #35393, Switching figure toolkit with...

 
 

bug #35393: Switching figure toolkit with graphics_toolkit() closes figure

Submitted by:  Rik <rik5>
Submitted on:  Sat 28 Jan 2012 09:27:37 PM UTC  
 
Category: Plotting with gnuplotSeverity: 2 - Minor
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: Ben Abbott <bpabbott>
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 26 Feb 2012 11:27:18 PM UTC, comment #5:

Lots of effort for a trivial patch.

http://hg.savannah.gnu.org/hgweb/octave/rev/eeff2d0a275d

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sun 26 Feb 2012 02:21:04 AM UTC, comment #4:

The following produces the proper result.

Which I infer to indicate the updater needs to do,

I'm still struggling to figure out how this should be done.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sun 26 Feb 2012 01:46:20 AM UTC, comment #3:

Looking more, I think what is needed is something like below.

At the moment, I'm having trouble figuring out what the genprops.awk script needs to see in graphics.h.in

I've tried both "su" and "sU" in place of "??" but either did something wrong or those qualifiers aren't correct.

Suggestions are welcome :-)

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sun 26 Feb 2012 12:49:50 AM UTC, comment #2:

I tried the script below.

The result is correct. Figure 1 contains the proper plot in a gnuplot window and figure 2 contains the proper plot in an FLTK window.

I don't understand how FLTK knows the window needs to be shut when it is swtiched to gnuplot, but it looks like the fix for the reported problem needs a very simple updater

I'll make an attempt to fix this.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sun 26 Feb 2012 12:23:23 AM UTC, comment #1:

Looking at graphics.h.in, I see there is no updater for the figure's _graphics_toolkit_ property. So there is less than "an overly simple listener" ;-)

We can gell genprops.awk there is a custom updater by adding the "u" qualifier.

Then we'll need to add the updater.

What should the updater do ?

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sat 28 Jan 2012 09:27:37 PM UTC, original submission:

This is a small and odd bug. If a graphics figure is created with the gnuplot backend, but no plot is made, and then that figure is switched to the FLTK backend then the figure is destroyed rather than converted. The reverse, starting with a blank FLTK figure and switching to gnuplot works.

The figure needs to be blank which suggests that the listener on "__graphics_toolkit__" is using an overly simple test to determine whether a figure exists.

Code to reproduce the problem:

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by rik5 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 26 Feb 2012 11:27:18 PM UTCbpabbottStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Sun 26 Feb 2012 12:49:50 AM UTCbpabbottStatusNone=>In Progress
      Assigned toNone=>bpabbott
      Release3.6.0=>dev

    Back to the top


    Powered by Savane 3.1-cleanup1