Mercurial > octave
changeset 23193:94f04d8172eb
maint: merge of stable to default.
author | Kai T. Ohlhus <k.ohlhus@gmail.com> |
---|---|
date | Fri, 17 Feb 2017 17:26:34 +0100 |
parents | 5f79bb3fdd28 (current diff) d222db279c21 (diff) |
children | 7cd6ecc578d6 |
files | libgui/graphics/Canvas.cc libgui/graphics/Canvas.h scripts/deprecated/sleep.m scripts/deprecated/usleep.m scripts/miscellaneous/version.m scripts/plot/util/print.m |
diffstat | 7 files changed, 32 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc Fri Feb 17 16:41:29 2017 +0100 +++ b/libgui/graphics/Canvas.cc Fri Feb 17 17:26:34 2017 +0100 @@ -374,7 +374,7 @@ void Canvas::select_object (graphics_object obj, QMouseEvent* event, graphics_object ¤tObj, graphics_object &axesObj, - bool axes_only) + bool axes_only, std::vector<std::string> omit) { QList<graphics_object> axesList; Matrix children = obj.get_properties ().get_all_children (); @@ -385,7 +385,17 @@ graphics_object childObj (gh_manager::get_object (children(i))); if (childObj.isa ("axes")) - axesList.append (childObj); + { + auto p = omit.begin (); + bool omitfound = false; + while (p != omit.end () && ! omitfound) + { + omitfound = (childObj.get ("tag").string_value () == *p); + p++; + } + if (! omitfound) + axesList.append (childObj); + } else if (childObj.isa ("uicontrol") || childObj.isa ("uipanel") || childObj.isa ("uibuttongroup")) { @@ -545,7 +555,8 @@ if (figObj.valid_object () && obj.valid_object ()) { graphics_object currentObj, axesObj; - select_object (obj, event, currentObj, axesObj, true); + std::vector<std::string> omit = {"legend", "colorbar", "scribeoverlay"}; + select_object (obj, event, currentObj, axesObj, true, omit); if (axesObj.valid_object ()) {
--- a/libgui/graphics/Canvas.h Fri Feb 17 16:41:29 2017 +0100 +++ b/libgui/graphics/Canvas.h Fri Feb 17 17:26:34 2017 +0100 @@ -108,7 +108,8 @@ void annotation_callback (const octave_value_list& args); void select_object (graphics_object obj, QMouseEvent* event, graphics_object ¤tObj, graphics_object &axesObj, - bool axes_only = false); + bool axes_only = false, + std::vector<std::string> omit = std::vector<std::string> ()); private: graphics_handle m_handle;
--- a/scripts/deprecated/sleep.m Fri Feb 17 16:41:29 2017 +0100 +++ b/scripts/deprecated/sleep.m Fri Feb 17 17:26:34 2017 +0100 @@ -17,7 +17,7 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {} {} sleep (@var{seconds})\n\ +## @deftypefn {} {} sleep (@var{seconds}) ## ## @code{sleep} is deprecated and will be removed in Octave version 4.6. ## Use @code{pause} instead.
--- a/scripts/deprecated/usleep.m Fri Feb 17 16:41:29 2017 +0100 +++ b/scripts/deprecated/usleep.m Fri Feb 17 17:26:34 2017 +0100 @@ -17,7 +17,7 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {} {} usleep (@var{microseconds})\n\ +## @deftypefn {} {} usleep (@var{microseconds}) ## ## @code{usleep} is deprecated and will be removed in Octave version 4.6. ## Use @code{pause} instead.
--- a/scripts/miscellaneous/version.m Fri Feb 17 16:41:29 2017 +0100 +++ b/scripts/miscellaneous/version.m Fri Feb 17 17:26:34 2017 +0100 @@ -36,7 +36,7 @@ ## for a description of the release (always an empty string), ## ## @item @qcode{"-release"} -## for the name of the running build, +## for the name of the running build (always an empty string), ## ## @item @qcode{"-java"} ## for version information of the Java @nospell{VM}, @@ -117,6 +117,9 @@ %!assert (version ("-date"), __octave_config_info__ ("release_date")) +%!assert (version ("-description"), "") +%!assert (version ("-release"), "") + ## Test input validation %!error version ("-date", "-release") %!error [v, d] = version ("-date")
--- a/scripts/plot/util/print.m Fri Feb 17 16:41:29 2017 +0100 +++ b/scripts/plot/util/print.m Fri Feb 17 17:26:34 2017 +0100 @@ -319,12 +319,16 @@ error ("print: directory %s does not exist", folder); endif - fid = fopen (opts.name, "w+"); + ## Check the requested file is writable + do_unlink = (exist (opts.name, "file") != 2); + fid = fopen (opts.name, "a"); if (fid == -1) error ("print: cannot open file %s for writing", opts.name); endif fclose (fid); - unlink (opts.name); + if (do_unlink) + unlink (opts.name); + endif opts.pstoedit_cmd = @pstoedit; opts.fig2dev_cmd = @fig2dev;
--- a/test/classdef/module.mk Fri Feb 17 16:41:29 2017 +0100 +++ b/test/classdef/module.mk Fri Feb 17 17:26:34 2017 +0100 @@ -2,6 +2,9 @@ test/classdef/foo_method_changes_property_size.m \ test/classdef/foo_static_method_constant_property.m \ test/classdef/foo_value_class.m \ - test/classdef/classdef.tst + test/classdef/classdef.tst \ + test/classdef/plist_t1.m \ + test/classdef/plist_t2.m \ + test/classdef/plist_t3.m TEST_FILES += $(classdef_TEST_FILES)