Mercurial > octave-nkf
changeset 20560:3aea4200da40
maint: Periodic merger of stable to default.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 28 Sep 2015 14:27:09 -0700 |
parents | 88459dd6780f (current diff) bbe6a846d8ac (diff) |
children | ecca28364445 |
files | libgui/graphics/Canvas.cc libinterp/corefcn/mex.h liboctave/system/file-ops.cc scripts/plot/appearance/annotation.m |
diffstat | 6 files changed, 30 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc Sun Sep 27 17:12:29 2015 +0200 +++ b/libgui/graphics/Canvas.cc Mon Sep 28 14:27:09 2015 -0700 @@ -631,9 +631,20 @@ "windowbuttondownfcn", button_number (event)); - gh_manager::post_callback (currentObj.get_handle (), - "buttondownfcn", - button_number (event)); + if (currentObj.get ("buttondownfcn").is_empty ()) + { + graphics_object parentObj = + gh_manager::get_object (currentObj.get_parent ()); + + if (parentObj.valid_object () && parentObj.isa ("hggroup")) + gh_manager::post_callback (parentObj.get_handle (), + "buttondownfcn", + button_number (event)); + } + else + gh_manager::post_callback (currentObj.get_handle (), + "buttondownfcn", + button_number (event)); if (event->button () == Qt::RightButton) ContextMenu::executeAt (currentObj.get_properties (),
--- a/libgui/graphics/gl-select.cc Sun Sep 27 17:12:29 2015 +0200 +++ b/libgui/graphics/gl-select.cc Mon Sep 28 14:27:09 2015 -0700 @@ -207,11 +207,11 @@ { Matrix xd = props.get_xdata ().matrix_value (); octave_idx_type nc = props.get_cdata ().columns (); - double x_pix_size = (xd(1) - xd(0)) / (nc - 1); + double x_pix_size = (nc == 1 ? 1 : (xd(1) - xd(0)) / (nc - 1)); Matrix yd = props.get_ydata ().matrix_value (); octave_idx_type nr = props.get_cdata ().rows (); - double y_pix_size = (yd(1) - yd(0)) / (nr - 1); + double y_pix_size = (nr == 1 ? 1 : (yd(1) - yd(0)) / (nr - 1)); ColumnVector p1(3, 0.0), p2(3, 0.0), p3(3, 0.0), p4(3, 0.0); p1(0) = xd(0) - x_pix_size/2;
--- a/libinterp/corefcn/mex.h Sun Sep 27 17:12:29 2015 +0200 +++ b/libinterp/corefcn/mex.h Mon Sep 28 14:27:09 2015 -0700 @@ -64,6 +64,8 @@ #define mxMAXNAME 64 +#include <stdint.h> + #include "mexproto.h" #if defined (__cplusplus)
--- a/liboctave/system/file-ops.cc Sun Sep 27 17:12:29 2015 +0200 +++ b/liboctave/system/file-ops.cc Mon Sep 28 14:27:09 2015 -0700 @@ -54,6 +54,10 @@ #include "singleton-cleanup.h" #include "str-vec.h" +#if (defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM)) +#include <algorithm> +#endif + file_ops *file_ops::instance = 0; bool @@ -738,6 +742,11 @@ free (tmp); } +#if (defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM)) + // Canonical Windows file separator is backslash. + std::replace (retval.begin (), retval.end (), '/', '\\'); +#endif + if (retval.empty ()) msg = gnulib::strerror (errno);
--- a/scripts/plot/appearance/annotation.m Sun Sep 27 17:12:29 2015 +0200 +++ b/scripts/plot/appearance/annotation.m Mon Sep 28 14:27:09 2015 -0700 @@ -100,6 +100,7 @@ ## @item @qcode{"textarrow"} ## Construct an arrow with a text label at the opposite end from the arrowhead. ## +## Use the "string" property to change the text string. ## The line and the arrowhead can be customized as for arrow annotations, and ## the text can be customized using the same properties as @code{text} graphics ## objects. Note, however, that some text property names are prefixed with @@ -112,6 +113,7 @@ ## Construct a box with text inside. @var{pos} specifies the ## @qcode{"position"} property of the annotation. ## +## Use the "string" property to change the text string. ## You may use @qcode{"backgroundcolor"}, @qcode{"edgecolor"}, ## @qcode{"linestyle"}, and @qcode{"linewidth"} properties to customize ## the box background color and edge appearance. A limited set of @code{text}