octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clicking "select" button in qt plots hampers ginput() operation


From: Mike Miller
Subject: Re: Clicking "select" button in qt plots hampers ginput() operation
Date: Sun, 30 Oct 2016 20:11:54 -0700
User-agent: NeoMutt/20161014 (1.7.1)

On Sun, Oct 30, 2016 at 07:55:44 -0700, Philip Nienhuis wrote:
> (This may be due to me not understanding fully what the "select" button in Qt
> plot windows does.)
> 
> I find that ginput() in qt plots, as soon as the select button (the arrow)
> is clicked any number of times, calls of the form:
> 
> [x, y, b] = ginput ()
> 
> return only empty output after several mouse clicks in the plot, and 
> 
> [x, y, b] = ginput (1)
> -or-
> [x, y, b] = ginput (N)   #  (where N is a positive integer)
> 
> simply does not return after a mouse click as I believe it should (and also
> returns empty output). On Linux hitting the Return key helps, on Windows
> this doesn't help and Octave even gets hung.
> 
> The way out is to click e.g., the zoom-in ("+") button twice - that
> apparently disengages the "select" button action.
> 
> Is this a bug? If yes I'll enter a bug report for it.
> If not a bug, what is the "select" button good for? I'd assume it should
> work a.o., to help ginput() "select" a point.
> 
> (FYI: I hit this when invoking ginput() on plots that were zoomed in - I
> clicked "select" to disengage the zoom-in button rather than clicking the
> zoom-in button another time)

The "select" button doesn't act as a toggle, it only sets the figure's
mouse mode to "select". The only way to reset the figure mouse mode to
"none" is to click either of the "rotate" or "pan" buttons twice.

The "select" button sets the hidden property "__mouse_mode__" to the
enumerated value "select". I don't know what this mode does or how it
interacts with the normal event listeners that are used to implement the
ginput() function, but hopefully this helps you.

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]