Mercurial > hg > octave-avbm
changeset 13821:4d1927edf194
waitbar: use previous bar if nargin == 1, not nargout == 1
* waitbar.m: Check nargin == 1, not nargout == 1 to decide whether to
use current waitbar object.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 04 Nov 2011 16:35:58 -0400 |
parents | f7bcac894ec6 |
children | 38e3bfc4e076 |
files | scripts/plot/waitbar.m |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/waitbar.m +++ b/scripts/plot/waitbar.m @@ -54,8 +54,8 @@ error ("waitbar: FRAC must be between 0 and 1"); endif - ## Use existing waitbar if it still points to a valid graphics handle - if (nargout == 0 && ishandle (curr_waitbar)) + ## Use existing waitbar if it still points to a valid graphics handle. + if (nargin == 1 && ishandle (curr_waitbar)) h = curr_waitbar; else h = false; @@ -111,6 +111,7 @@ "xlim", [0, 1], "ylim", [0, 1], "xlimmode", "manual", "ylimmode", "manual", "position", [0.1, 0.3, 0.8, 0.2]); + patch (ax, [0; frac; frac; 0], [0; 0; 1; 1], [0, 0.35, 0.75]); if (ischar (msg))