Mercurial > hg > octave-nkf
diff scripts/plot/uiwait.m @ 14226:d580d7179f85
Use isfigure() to simplify some plot functions.
* figure.m, refresh.m, uiresume.m, uiwait.m: Simplify code by using isfigure().
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 18 Jan 2012 21:17:14 -0800 |
parents | 72c96de7a403 |
children | d00900b3dc4b |
line wrap: on
line diff
--- a/scripts/plot/uiwait.m +++ b/scripts/plot/uiwait.m @@ -47,8 +47,8 @@ h = get (0, "currentfigure"); else h = varargin{1}; - if (! ishandle (h) || ! strcmp (get (h, "type"), "figure")) - error ("uiwait: invalid figure handle"); + if (! isfigure (h)) + error ("uiwait: invalid figure handle H"); endif if (nargin > 1) timeout = varargin{2}; @@ -63,7 +63,7 @@ if (! strcmp (get (h, "__uiwait_state__"), "none")) error ("uiwait: an active uiwait call for this figure already exists"); endif - set (h, "__uiwait_state__", "active"); + set (h, "__uiwait_state__", "active"); end_try_catch waitfor_args = {h, "__uiwait_state__", "triggered"}; if (! isempty (timeout))