Fixes Setting the dive-location via the map.

This patch adds a context menu to set the dive location
via the globe, being the dive with a coordinate or not.

It also fixes setting the dive location on edit mode.

Fixes: #315

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-12-02 15:06:19 -02:00 committed by Dirk Hohndel
parent bbc022ba18
commit d26f109fba
3 changed files with 31 additions and 36 deletions

View file

@ -166,12 +166,11 @@ void MainTab::enableEdition(EditMode newEditMode)
return;
mainWindow()->dive_list()->setEnabled(false);
mainWindow()->globe()->diveEditMode();
mainWindow()->globe()->prepareForGetDiveCoordinates();
// We may be editing one or more dives here. backup everything.
notesBackup.clear();
ui.notesButtonBox->show();
ui.equipmentButtonBox->show();
if (mainWindow() && mainWindow()->dive_list()->selectedTrips().count() == 1) {
// we are editing trip location and notes
ui.diveNotesMessage->setText(tr("This trip is being edited. Select Save or Cancel when done."));