diff options
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 1236c949d..fe1143f39 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -58,6 +58,13 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), ui.extraData->setModel(extraDataModel); closeMessage(); + QCompleter *completer = new QCompleter(); + completer->setModel(LocationInformationModel::instance()); + completer->setCompletionColumn(LocationInformationModel::NAME); + completer->setCompletionRole(Qt::DisplayRole); + completer->setCompletionMode(QCompleter::PopupCompletion); + + ui.location->setCompleter(completer); connect(ui.addDiveSite, SIGNAL(clicked()), this, SLOT(showDiveSiteSimpleEdit())); QAction *action = new QAction(tr("Apply changes"), this); @@ -746,6 +753,7 @@ void MainTab::reload() buddyModel.updateModel(); diveMasterModel.updateModel(); tagModel.updateModel(); + LocationInformationModel::instance()->update(); } // tricky little macro to edit all the selected dives |