Apply the edit of trip locations

This re-adds this code that got removed in a209dfbfd5 ("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>
This commit is contained in:
Anton Lundin 2014-05-07 23:53:52 +02:00 committed by Dirk Hohndel
parent b59a106251
commit b5cc387f03

View file

@ -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);
}