diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-07-16 18:47:57 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-16 18:34:22 -0700 |
commit | 0a473b3a2af6cab57f1fc0f360aff7e2dfeca133 (patch) | |
tree | fd9fa236a8d5d7c493311bbfa0efdac17788f60b /qt-ui/modeldelegates.cpp | |
parent | 56240cff5ba2e8b762d3ba85cf62aafdc874d693 (diff) | |
download | subsurface-0a473b3a2af6cab57f1fc0f360aff7e2dfeca133.tar.gz |
Fix mouse interaction with the Location List
paint methods should be used only to paint, not to trigger other
widget behaviours ( we could got ourselves into a bad recursion
bug from that ). Also, enabled mouse tracking to correctly track
the mouse movement inside the widget.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/modeldelegates.cpp')
-rw-r--r-- | qt-ui/modeldelegates.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp index 404d329fc..848c66fa8 100644 --- a/qt-ui/modeldelegates.cpp +++ b/qt-ui/modeldelegates.cpp @@ -540,17 +540,6 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem free( (void*) gpsCoords); } -#ifndef NO_MARBLE - if ((option.state & QStyle::State_HasFocus)) { - // show either the GPS location of the currently focused dive site or - // the gps data for the displayed dive site (even if that has no GPS -> zoom out) - if (dive_site_has_gps_location(ds)) - MainWindow::instance()->globe()->centerOnDiveSite(ds); - else - MainWindow::instance()->globe()->centerOnDiveSite(&displayed_dive_site); - } -#endif - if (dive_site_has_gps_location(ds) && dive_site_has_gps_location(&displayed_dive_site)) { // so we are showing a completion and both the current dive site and the completion // have a GPS fix... so let's show the distance |