changeset 20631:69270256b879

Qt Figure: allow displaying coordinates when hovered axes parent is a uipanel. * Canvas/cc (Canvas::canvasMouseMoveEvent): call "select_object" with the actual Canvas object which may also be a uipanel.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sat, 10 Oct 2015 13:07:51 +0200
parents 99eb26310cb3
children 1c5a86b7f838
files libgui/graphics/Canvas.cc
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc	Sat Oct 10 12:48:10 2015 +0200
+++ b/libgui/graphics/Canvas.cc	Sat Oct 10 13:07:51 2015 +0200
@@ -526,13 +526,13 @@
     }
 
   // Update mouse coordinates in the figure window status bar
-  graphics_object figObj =
-    gh_manager::get_object (m_handle).get_ancestor ("figure");
+  graphics_object obj = gh_manager::get_object (m_handle);
+  graphics_object figObj = obj.get_ancestor ("figure");
 
-  if (figObj.valid_object ())
+  if (figObj.valid_object () && obj.valid_object ())
     {
       graphics_object currentObj, axesObj;
-      select_object (figObj, event, currentObj, axesObj, true);
+      select_object (obj, event, currentObj, axesObj, true);
 
       if (axesObj.valid_object ())
         {