changeset 24457:e3751f50e8ef

make ginput work again (bug #52699) * ginput.m (ginput_accumulator): Don't try to make function outputs persistent.
author John W. Eaton <jwe@octave.org>
date Sat, 23 Dec 2017 14:15:31 -0500
parents 2706adccf4e9
children 516437d2194d
files scripts/plot/util/ginput.m
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/ginput.m	Fri Dec 22 18:32:07 2017 -0500
+++ b/scripts/plot/util/ginput.m	Sat Dec 23 14:15:31 2017 -0500
@@ -110,7 +110,7 @@
 
 endfunction
 
-function [x, y, n, button] = ginput_accumulator (mode, xn, yn, btn)
+function [rx, ry, rn, rbutton] = ginput_accumulator (mode, xn, yn, btn)
   persistent x y n button;
 
   if (mode == 0)
@@ -126,7 +126,12 @@
   elseif (mode == 2)
     ## The end due to Enter.
     n = -1;
- endif
+  endif
+
+  rx = x;
+  ry = y;
+  rn = n;
+  rbutton = button;
 
 endfunction