A better guard for 'dive being editted'

Mouse activity on the globe should not select dives when one or more dives
are being edited. This improves the detection of that state.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-05-01 13:45:43 -03:00 committed by Dirk Hohndel
parent 83c5ab5871
commit 9fcd6b2658

View file

@ -109,7 +109,7 @@ void GlobeGPS::contextMenuEvent(QContextMenuEvent *ev)
void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit) void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
{ {
// don't mess with the selection while the user is editing a dive // don't mess with the selection while the user is editing a dive
if (MainWindow::instance()->information()->isEditing()) if (MainWindow::instance()->information()->isEditing() || messageWidget->isVisible())
return; return;
GeoDataCoordinates here(lon, lat, unit); GeoDataCoordinates here(lon, lat, unit);