Mercurial > hg > octave-nkf
diff scripts/plot/util/private/__gnuplot_ginput__.m @ 19031:dd34502e5c3c stable
Use button value 1 for mouse button keypress 1063 (Bug #42489)
* scripts/plot/util/private/__gnuplot_ginput__.m: if MOUSE_KEY=1063, use value '1'
author | John Donoghue |
---|---|
date | Tue, 17 Jun 2014 12:04:18 -0400 |
parents | d63878346099 |
children | 6ca096827123 |
line wrap: on
line diff
--- a/scripts/plot/util/private/__gnuplot_ginput__.m +++ b/scripts/plot/util/private/__gnuplot_ginput__.m @@ -101,7 +101,7 @@ fputs (ostream, "set print \"-\";\n"); fflush (ostream); fputs (ostream, "pause mouse any;\n\n"); - fputs (ostream, "\nif (exists(\"MOUSE_KEY\") && exists(\"MOUSE_X\")) print \"OCTAVE: \", MOUSE_X, MOUSE_Y, MOUSE_KEY; else print \"0 0 -1\"\n"); + fputs (ostream, "\nif (exists(\"MOUSE_KEY\") && exists(\"MOUSE_X\")) key = (MOUSE_KEY==1063 ? 1 : MOUSE_KEY); print \"OCTAVE: \", MOUSE_X, MOUSE_Y, key; else print \"0 0 -1\"\n"); ## Close output file, to force it to be flushed fputs (ostream, "set print;\n");