Mercurial > octave-nkf
comparison libgui/graphics/Canvas.cc @ 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 | 46edfbd31ad7 |
children |
comparison
equal
deleted
inserted
replaced
20630:99eb26310cb3 | 20631:69270256b879 |
---|---|
524 } | 524 } |
525 } | 525 } |
526 } | 526 } |
527 | 527 |
528 // Update mouse coordinates in the figure window status bar | 528 // Update mouse coordinates in the figure window status bar |
529 graphics_object figObj = | 529 graphics_object obj = gh_manager::get_object (m_handle); |
530 gh_manager::get_object (m_handle).get_ancestor ("figure"); | 530 graphics_object figObj = obj.get_ancestor ("figure"); |
531 | 531 |
532 if (figObj.valid_object ()) | 532 if (figObj.valid_object () && obj.valid_object ()) |
533 { | 533 { |
534 graphics_object currentObj, axesObj; | 534 graphics_object currentObj, axesObj; |
535 select_object (figObj, event, currentObj, axesObj, true); | 535 select_object (obj, event, currentObj, axesObj, true); |
536 | 536 |
537 if (axesObj.valid_object ()) | 537 if (axesObj.valid_object ()) |
538 { | 538 { |
539 // FIXME: should we use signal/slot mechanism instead of | 539 // FIXME: should we use signal/slot mechanism instead of |
540 // directly calling parent fig methods | 540 // directly calling parent fig methods |