It was a bug in my code. :)
dirk explained to me how to trigger it, here is the fix.:
From 07778598514461748a9f679d523283bda5609bcc Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <[email protected]>
Date: Fri, 17 Jul 2015 14:08:01 -0300
Subject: [PATCH 2/2] Make sure we don't pass the wrong info

We where returning true here, which meant that we where
overriding the information with the wrong value later.

Signed-off-by: Tomaz Canabrava <[email protected]>
---
 qt-ui/locationinformation.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 2e29645..55e5bef 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -242,6 +242,8 @@ bool LocationManagementEditHelper::eventFilter(QObject *obj, QEvent *ev)
 		QKeyEvent *keyEv = (QKeyEvent*) ev;
 		if(keyEv->key() == Qt::Key_Space || keyEv->key() == Qt::Key_Return) {
 			handleActivation(view->currentIndex());
+			view->hide();
+			return true;
 		}
 
 	}
-- 
2.4.6

From 22ab315c09b701f2972d5f11560a95f19b1848c2 Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <[email protected]>
Date: Fri, 17 Jul 2015 14:01:17 -0300
Subject: [PATCH 1/2] Remove buggy code

This code is already implemented as a signal-connection
on the maintab.cpp / globe.cpp

Signed-off-by: Tomaz Canabrava <[email protected]>
---
 qt-ui/modeldelegates.cpp | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index 848c66f..91b6c6e 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -510,13 +510,6 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem
 	if (index.row() < 2) {
 		diveSiteName = index.data().toString();
 		bottomText = index.data(Qt::ToolTipRole).toString();
-#ifndef NO_MARBLE
-		if ((option.state & QStyle::State_HasFocus)) {
-			// we call this even if the displayed dive site has no GPS data
-			// so that the globe appropriately zooms out...
-			MainWindow::instance()->globe()->centerOnDiveSite(&displayed_dive_site);
-		}
-#endif
 		goto print_part;
 	}
 
-- 
2.4.6

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to