mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 00:13:24 +00:00
Update completion model for dive site names
This way the drop down works again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
801e584029
commit
f8b63e1bb6
1 changed files with 13 additions and 1 deletions
|
@ -40,9 +40,21 @@
|
|||
|
||||
CREATE_CSV_UPDATE_METHOD(BuddyCompletionModel, buddy);
|
||||
CREATE_CSV_UPDATE_METHOD(DiveMasterCompletionModel, divemaster);
|
||||
CREATE_UPDATE_METHOD(LocationCompletionModel, location);
|
||||
CREATE_UPDATE_METHOD(SuitCompletionModel, suit);
|
||||
|
||||
void LocationCompletionModel::updateModel()
|
||||
{
|
||||
QStringList list;
|
||||
struct dive_site *ds;
|
||||
int i = 0;
|
||||
for_each_dive_site(i, ds) {
|
||||
if (!list.contains(ds->name))
|
||||
list.append(ds->name);
|
||||
}
|
||||
std::sort(list.begin(), list.end());
|
||||
setStringList(list);
|
||||
}
|
||||
|
||||
void TagCompletionModel::updateModel()
|
||||
{
|
||||
if (g_tag_list == NULL)
|
||||
|
|
Loading…
Add table
Reference in a new issue