diff options
-rw-r--r-- | qt-ui/globe.cpp | 4 | ||||
-rw-r--r-- | qt-ui/maintab.cpp | 5 | ||||
-rw-r--r-- | qt-ui/maintab.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index c2ae56536..9e733cefc 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -71,6 +71,10 @@ GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0) void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit) { + // don't mess with the selection while the user is editing a dive + if (mainWindow()->information()->isEditing()) + return; + GeoDataCoordinates here(lon, lat, unit); long lon_udeg = rint(1000000 * here.longitude(GeoDataCoordinates::Degree)); long lat_udeg = rint(1000000 * here.latitude(GeoDataCoordinates::Degree)); diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 6c071d911..0c0d99a35 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -253,6 +253,11 @@ void MainTab::clearStats() else \ ui.field->setText(get_temperature_string(d->field, TRUE)) +bool MainTab::isEditing() +{ + return editMode != NONE; +} + void MainTab::updateDiveInfo(int dive) { if (!isEnabled() && dive != -1) diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h index 68803c02d..341a282e8 100644 --- a/qt-ui/maintab.h +++ b/qt-ui/maintab.h @@ -58,6 +58,7 @@ public: bool eventFilter(QObject* , QEvent*); void initialUiSetup(); void equipmentPlusUpdate(); + bool isEditing(); public slots: void addCylinder_clicked(); void addWeight_clicked(); |