summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 043fe0a6a..88b607d1b 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -67,6 +67,11 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
completer->setCaseSensitivity(Qt::CaseInsensitive);
completerListview->setItemDelegate(new LocationFilterDelegate());
+ locationManagementEditHelper = new LocationManagementEditHelper();
+ completerListview->installEventFilter(locationManagementEditHelper);
+ connect(completerListview, &QAbstractItemView::activated,
+ locationManagementEditHelper, &LocationManagementEditHelper::handleActivation);
+
ui.location->setCompleter(completer);
connect(ui.addDiveSite, SIGNAL(clicked()), this, SLOT(showDiveSiteSimpleEdit()));
connect(ui.geocodeButton, SIGNAL(clicked()), this, SLOT(reverseGeocode()));
@@ -386,6 +391,7 @@ void MainTab::enableEdition(EditMode newEditMode)
displayMessage(tr("Multiple dives are being edited."));
} else {
displayMessage(tr("This dive is being edited."));
+ locationManagementEditHelper->resetDiveSiteUuid();
}
editMode = newEditMode != NONE ? newEditMode : DIVE;
}