summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-10-01 17:52:00 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-01 18:01:15 -0400
commit3548d111957ac980a54b358fe63a873e94f74d35 (patch)
tree3bad5bd303a1666141f4e6afd67798e39cfcc273 /qt-ui
parentdb97f33e13a039c32c888567b90633f9c5dc54fb (diff)
downloadsubsurface-3548d111957ac980a54b358fe63a873e94f74d35.tar.gz
Update the dive site location when editing
Simple. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp12
-rw-r--r--qt-ui/maintab.h1
2 files changed, 8 insertions, 5 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index df813bc5f..70a5bad0a 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -1502,14 +1502,16 @@ void MainTab::on_location_diveSiteSelected()
}
}
+ updateDisplayedDiveSite();
+}
+
+void MainTab::on_diveTripLocation_textChanged(const QString& text)
+{
if (currentTrip) {
free(displayedTrip.location);
- displayedTrip.location = strdup(qPrintable(ui.location->text()));
- markChangedWidget(ui.location);
- return;
+ displayedTrip.location = strdup(qPrintable(text));
+ markChangedWidget(ui.diveTripLocation);
}
-
- updateDisplayedDiveSite();
}
void MainTab::on_suit_textChanged(const QString &text)
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index 1fffc2194..b4bd33865 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -72,6 +72,7 @@ slots:
void on_divemaster_textChanged();
void on_buddy_textChanged();
void on_suit_textChanged(const QString &text);
+ void on_diveTripLocation_textChanged(const QString& text);
void on_notes_textChanged();
void on_airtemp_textChanged(const QString &text);
void divetype_Changed(int);