1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

Switch tab title to Trip Notes when handling a trip

And switch back to Dive Notes when back to looking at a dive. This makes
things more consistent...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-11-25 11:05:09 -08:00
parent d0fbfc7a9c
commit eec732548b

View file

@ -293,6 +293,7 @@ void MainTab::updateDiveInfo(int dive)
updateGpsCoordinates(d);
ui.dateTimeEdit->setDateTime(QDateTime::fromTime_t(d->when - gettimezoneoffset()));
if (mainWindow() && mainWindow()->dive_list()->selectedTrips.count() == 1) {
setTabText(0, tr("Trip Notes"));
// only use trip relevant fields
ui.coordinates->setVisible(false);
ui.CoordinatedLabel->setVisible(false);
@ -318,6 +319,7 @@ void MainTab::updateDiveInfo(int dive)
ui.NotesLabel->setText(tr("Trip Notes"));
ui.notes->setText(currentTrip->notes);
} else {
setTabText(0, tr("Dive Notes"));
// make all the fields visible writeable
ui.coordinates->setVisible(true);
ui.CoordinatedLabel->setVisible(true);