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

 
 

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

Submitted by:  None
Submitted on:  Wed 12 Jul 2017 04:23:26 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: swadejOriginator Email: -unavailable-
Open/Closed: OpenRelease: dev
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

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>
Project 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>
Project 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>
Project 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>
Project 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>
Project Administrator
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>
Project 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>
Project 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>
Project Administrator
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>
Project 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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 01 Sep 2017 04:18:35 PM UTCrik5Summaryginput returns empty array when figure is in select / plotedit mode=>Disable/Restore qt plot buttons during ginput capture
    Wed 30 Aug 2017 03:34:05 PM UTCmtmillerDependencies-=>bugs #51896 is dependent
    Thu 20 Jul 2017 03:05:04 PM UTCpantxoOperating SystemMicrosoft Windows=>Any
    Sat 15 Jul 2017 04:03:10 PM UTCmtmillerSummaryWhen using ginput(), select returns zero array after zooming=>ginput returns empty array when figure is in select / plotedit mode
    Wed 12 Jul 2017 06:22:46 PM UTCpantxoCategoryPlotting=>Plotting with OpenGL
      Release4.0.3=>dev
    Wed 12 Jul 2017 06:15:14 PM UTCpantxoItem GroupUnexpected Error=>Incorrect Result
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1