From 66cbdea8a194ce230a7240923609b7a7c9a91469 Mon Sep 17 00:00:00 2001 From: Karina Mochetti Date: Sat, 16 Aug 2014 21:35:32 -0300 Subject: Crash clicking on the globe without a dive When the user right clicks the globe, we should only present the menu action if there's a current dive, if not, we disable it. Signed-off-by: Karina Mochetti Signed-off-by: Dirk Hohndel --- qt-ui/globe.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index b9bbf2dde..18bdc92c3 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -119,6 +119,7 @@ void GlobeGPS::contextMenuEvent(QContextMenuEvent *ev) QMenu m; QAction *a = m.addAction(tr("Edit selected dive locations"), this, SLOT(prepareForGetDiveCoordinates())); a->setData(QVariant::fromValue(&m)); + a->setEnabled(current_dive); m.exec(ev->globalPos()); } -- cgit v1.2.3-70-g09d2