Mercurial > octave-nkf
diff libgui/graphics/Canvas.cc @ 20141:8eb72c4ed457
Add uicontextmenu to annotation objects
* Canvas.cc (Canvas::canvasMousePressEvent): Allow searching in axes that have hidden handles so that annotations objects can be picked by mouse events.
* Canvas.cc (Canvas::canvasMousePressEvent): later disallow manipulating hidden axes in pan/zoomin/zoomout/rotate modes
* annotation.m: add context menu to manipulate annotation properties
* annotation.m: fix wrong position of textbox when position has negative width/height
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Mon, 20 Apr 2015 09:26:13 +0200 |
parents | c164cfc24bdd |
children | f1f6d5eab46f |
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc Sun Apr 12 21:11:32 2015 +0200 +++ b/libgui/graphics/Canvas.cc Mon Apr 20 09:26:13 2015 +0200 @@ -472,7 +472,7 @@ graphics_object currentObj, axesObj; QList<graphics_object> axesList; - Matrix children = obj.get_properties ().get_children (); + Matrix children = obj.get_properties ().get_all_children (); octave_idx_type num_children = children.numel (); for (int i = 0; i < num_children; i++) @@ -518,7 +518,7 @@ axesObj = *it; } - if (axesObj) + if (axesObj && currentObj) break; } @@ -604,7 +604,7 @@ case RotateMode: case ZoomInMode: case ZoomOutMode: - if (axesObj) + if (axesObj && axesObj.get_properties ().handlevisibility_is ("on")) { bool redraw_figure = true;