When updating the dive site name, show this on the maintab

If we accept a change on the dive site management screen, it needs to be
reflected on the Dive notes tab right away.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-02-13 23:49:05 -08:00
parent 6820b13bd5
commit f81e2c111d
3 changed files with 8 additions and 0 deletions

View file

@ -395,6 +395,11 @@ bool MainTab::isEditing()
return editMode != NONE;
}
void MainTab::showLocation()
{
ui.location->setText(get_dive_location(&displayed_dive));
}
void MainTab::updateDiveInfo(bool clear)
{
// don't execute this while adding / planning a dive

View file

@ -93,6 +93,8 @@ slots:
void photoDoubleClicked(const QString filePath);
void removeSelectedPhotos();
void prepareDiveSiteEdit();
void showLocation();
private:
Ui::MainTab ui;
WeightModel *weightModel;

View file

@ -114,6 +114,7 @@ MainWindow::MainWindow() : QMainWindow(),
connect(mainTab, SIGNAL(requestDiveSiteEdit(uint32_t)), this, SLOT(enableDiveSiteEdit(uint32_t)));
connect(locationInformation, SIGNAL(informationManagementEnded()), this, SLOT(setDefaultState()));
connect(locationInformation, SIGNAL(informationManagementEnded()), this, SLOT(refreshDisplay()));
connect(locationInformation, SIGNAL(informationManagementEnded()), information(), SLOT(showLocation()));
#ifdef NO_PRINTING
ui.printPlan->hide();