Mercurial > octave-nkf
diff scripts/plot/util/private/__fltk_ginput__.m @ 19411:9ef286208da1
maint: Periodic merge of gui-release to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 02 Dec 2014 10:05:03 -0500 |
parents | 0ee9daa71273 3492b771c2e6 |
children | 4197fc428c7d |
line wrap: on
line diff
--- a/scripts/plot/util/private/__fltk_ginput__.m Thu Nov 27 21:49:55 2014 +0100 +++ b/scripts/plot/util/private/__fltk_ginput__.m Tue Dec 02 10:05:03 2014 -0500 @@ -47,7 +47,14 @@ sleep (0.01); [x, y, n0, button] = ginput_accumulator (-1, 0, 0, 0); - until (n0 == n || n0 < 0) + until ((n > -1 && n0 >= n) || n0 < 0) + + if (n0 > n) + ## More clicks than requested due to double-click or too fast clicking + x = x(1:n); + y = y(1:n); + button = button(1:n); + endif unwind_protect_cleanup set (gca, "buttondownfcn", orig_buttondownfcn);