summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-05-07 23:53:52 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-07 15:18:59 -0700
commitb5cc387f03dc686af63315a61779090c60c6d582 (patch)
tree786bc8c1e734bc74bda705670e4cb2ed115c2548
parentb59a10625163035426e422c000471f162ab25f17 (diff)
downloadsubsurface-b5cc387f03dc686af63315a61779090c60c6d582.tar.gz
Apply the edit of trip locations
This re-adds this code that got removed in a209dfbfd53 ("Multi dive edit: don't change location texts until user saves the change") Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/maintab.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index baeb81696..234a01c43 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -996,6 +996,11 @@ void MainTab::on_location_textChanged(const QString &text)
{
if (editMode == NONE)
return;
+ if (editMode == TRIP && MainWindow::instance() && MainWindow::instance()->dive_list()->selectedTrips().count() == 1) {
+ // we are editing a trip
+ dive_trip_t *currentTrip = *MainWindow::instance()->dive_list()->selectedTrips().begin();
+ EDIT_TRIP_TEXT(currentTrip->location, text);
+ }
markChangedWidget(ui.location);
}