bugGNU Octave - Bugs: bug #51452, Disable/Restore qt plot buttons...

 
 

bug #51452: Disable/Restore qt plot buttons during ginput capture

Submitter:  None
Submitted:  Wed 12 Jul 2017 04:23:26 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  swadej Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 05 Sep 2018 07:01:30 AM UTC, comment #13: 

Ok, closing this report as fixed.

Pantxo Diribarne <pantxo>
Group Member
Tue 04 Sep 2018 07:37:45 PM UTC, comment #12: 

Works fine for me on Windows 7.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 04 Sep 2018 04:35:23 PM UTC, comment #11: 

I pushed a small patch, much less ambitious than switching our default toolbar to uitoolbar, that fixes the issue for me:

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

Marking ready for test.

Pantxo Diribarne <pantxo>
Group Member
Fri 01 Sep 2017 04:18:35 PM UTC, comment #10: 

I re-titled to--hopefully--something clearer.  Also, see comment #8 for a possible way to implement the Save/Disable/Restore.

Rik <rik5>
Group administrator
Thu 31 Aug 2017 09:37:18 AM UTC, comment #9: 

This bug refers to not just the Select button but to any button in the Qt graphics window (see bug #51896, a dupe of this one).
The fltk toolkit is not affected.

The provisional workaround is simple: make sure all buttons are inactive.

Anyone with a good suggestion for a better title?

Philip Nienhuis <philipnienhuis>
Group Member
Thu 20 Jul 2017 03:34:29 PM UTC, comment #8: 

Matlab is being dopey here.  In terms of the philosophy of UI design, I should not expect that there would be side effects from calling ginput.  It would be more intuitive if ginput were to save the current graphics settings, execute, and then restore the settings.  I see no need to slavishly copy Matlab in this regard.

At least for the FLTK toolkit this may not be hard to implement.  The menu options are already implemented as uimenus if we want to disable them.  And the actual zoom, pan, rotate values are stored in hidden properties on the figure (_rotate_mode_, _pan_mode_, _zoom_mode_).  The ginput.m script already uses an unwind_protect block to restore some settings after completion.  It should be dead simple to store and retrieve these values.

Rik <rik5>
Group administrator
Thu 20 Jul 2017 03:05:04 PM UTC, comment #7: 

No, I tested with zoom-in initially enabled and after ginput has returned no toggle tool is selected anymore.

Pantxo Diribarne <pantxo>
Group Member
Thu 20 Jul 2017 02:59:27 PM UTC, comment #6: 

When ginput ends, does it restore the mode that was active before?

Mike Miller <mtmiller>
Group Member
Thu 20 Jul 2017 02:37:21 PM UTC, comment #5: 

I just checked in matlab 2016a and invoking ginput disables pan, zoom, rotate, select and data cursor modes (buttons are grayed out and non selectable). It seams reasonable to implement the same kind of behavior.

It has been noticed (but I fail to find where this discussion took place, Rik?) that in matlab default menus (File, Edit ...) are regular uimenu objects contrary to Octave which uses hard-coded QMenus. The situation is the same for default toolbar buttons.

We probably should first implement default menus and toolbar buttons with regular ui* objects so that it is easy to set their "enable" property "off" when needed.

Pantxo Diribarne <pantxo>
Group Member
Wed 19 Jul 2017 04:22:05 PM UTC, comment #4: 

This should be fixed because through various combinations of buttons on the menubar and ginput I can generate segfaults repeatably.

It seems like ginput should temporarily override whatever tool is selected.  For example, even if the zoom tool is selected, I do not want to zoom in while I am collecting data points with ginput.

Rik <rik5>
Group administrator
Sat 15 Jul 2017 04:03:10 PM UTC, comment #3: 

Alternatively, if the selection button is kept, it should at least be made into a toggle button so it can be enabled/disabled like the others. Now it can only be enabled, and the user can't tell that it's enabled.

Mike Miller <mtmiller>
Group Member
Wed 12 Jul 2017 06:22:46 PM UTC, comment #2: 

Changing the category to "Plotting with OpenGL", but the bug can only be reprodu ced with Qt toolkit. Also changing the release to dev.

Pantxo Diribarne <pantxo>
Group Member
Wed 12 Jul 2017 06:15:14 PM UTC, comment #1: 

Hi,

I can reproduce the bug by following the following steps:

  • run "ginput ()" in the terminal
  • push the "selection" tool (the arrow button) in the figure window
  • trying to pick any number of point won't make the ginput command return


The workaround is to not use the "selection" tool (which I think is not functional and should be removed until it is actually doing something). Simply unselect the "zoom" tool by clicking the corresponding button and you can pick the points you like so that ginput returns.

Pantxo Diribarne <pantxo>
Group Member
Wed 12 Jul 2017 04:23:26 PM UTC, original submission:  

This worked a week ago so I'm not sure what happened, but I need to be able to zoom into my plot so I can find a stable region in my data. I then need to select 2 points within that stable region.

When the plot comes up at the ginput() call, the select works. However if I zoom into a region, and then try to return to the select (I turn off zoom and click the select button), my ginput() array will always return zero. Which naturally produces this error output:

"subscript indices must be either positive integers less than 2^31 or logicals"

As I said this wasn't an issue a week ago, but I'm unable to resolve by normal means.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-05 pantxo StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-09-04 pantxo Dependencies- bugs #54616 is dependent
    2018-09-04 pantxo StatusConfirmed Ready For Test
    2017-09-01 rik5 Summaryginput returns empty array when figure is in select / plotedit mode Disable/Restore qt plot buttons during ginput capture
    2017-08-30 mtmiller Dependencies- bugs #51896 is dependent
    2017-07-20 pantxo Operating SystemMicrosoft Windows Any
    2017-07-15 mtmiller SummaryWhen using ginput(), select returns zero array after zooming ginput returns empty array when figure is in select / plotedit mode
    2017-07-12 pantxo CategoryPlotting Plotting with OpenGL
        Release4.0.3 dev
    2017-07-12 pantxo Item GroupUnexpected Error or Warning Incorrect Result
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code