Mercurial > hg > octave-lyh
changeset 8239:041bb0c64f07
orient.m,print.f: validate figure handle
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Mon, 20 Oct 2008 10:29:04 -0400 |
parents | 6ef647359f07 |
children | 5cfeb7bc497a |
files | scripts/ChangeLog scripts/plot/orient.m scripts/plot/print.m |
diffstat | 3 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -3,6 +3,8 @@ * plot/__stem__.m: Respect new ordering of children when setting baseline. + * plot/orient.m, plot/print.m: Properly validate figure handle. + 2008-10-20 David Bateman <dbateman@free.fr> * plot/plotyy.m: Test that an axes handle actually is one before
--- a/scripts/plot/orient.m +++ b/scripts/plot/orient.m @@ -32,7 +32,7 @@ nargs = nargin; - if (nargs > 0 && numel (varargin{1}) == 1 && ishandle (varargin{1})) + if (nargs > 0 && numel (varargin{1]) == 1 && isfigure (varargin{1})) cf = varargin{1}; varargin(1) = []; nargs--;
--- a/scripts/plot/print.m +++ b/scripts/plot/print.m @@ -190,7 +190,7 @@ elseif (length (arg) > 0) name = arg; endif - elseif (ishandle (arg)) + elseif (isfigure (arg)) figure (arg); else error ("print: expecting inputs to be character string options or a figure handle"); @@ -439,7 +439,7 @@ endif unwind_protect_cleanup - if (ishandle (old_fig)) + if (isfigure (old_fig)) figure (old_fig) endif end_unwind_protect