comparison 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
comparison
equal deleted inserted replaced
19405:009191dbc76d 19411:9ef286208da1
45 45
46 ## Release CPU. 46 ## Release CPU.
47 sleep (0.01); 47 sleep (0.01);
48 48
49 [x, y, n0, button] = ginput_accumulator (-1, 0, 0, 0); 49 [x, y, n0, button] = ginput_accumulator (-1, 0, 0, 0);
50 until (n0 == n || n0 < 0) 50 until ((n > -1 && n0 >= n) || n0 < 0)
51
52 if (n0 > n)
53 ## More clicks than requested due to double-click or too fast clicking
54 x = x(1:n);
55 y = y(1:n);
56 button = button(1:n);
57 endif
51 58
52 unwind_protect_cleanup 59 unwind_protect_cleanup
53 set (gca, "buttondownfcn", orig_buttondownfcn); 60 set (gca, "buttondownfcn", orig_buttondownfcn);
54 set (gcf, "keypressfcn", orig_ginput_keypressfcn); 61 set (gcf, "keypressfcn", orig_ginput_keypressfcn);
55 end_unwind_protect 62 end_unwind_protect