Mercurial > octave
diff libgui/graphics/Canvas.cc @ 23360:43f549ac6dac stable
Let mouse selection of Qt figures update "currentfigure" (bug #50666)
* Canvas.cc (Canvas::canvasMousePressEvent): update root "currentfigure"
property
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Fri, 31 Mar 2017 15:49:57 +0200 |
parents | 3ac9f9ecfae5 |
children | 695ff87bc838 708b98b4cdd1 |
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc Mon Apr 03 07:53:30 2017 -0400 +++ b/libgui/graphics/Canvas.cc Fri Mar 31 15:49:57 2017 +0200 @@ -616,6 +616,14 @@ if (obj.valid_object ()) { graphics_object figObj (obj.get_ancestor ("figure")); + + if (figObj) + { + graphics_object root = gh_manager::get_object (0); + Utils::properties<root_figure> (root) + .set_currentfigure (figObj.get_handle ().as_octave_value ()); + } + graphics_object currentObj, axesObj; select_object (obj, event, currentObj, axesObj);