mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
desktop: update completion models if dive was edited
In the main-tab, when changing tag, buddy or divemaster, update the corresponding completion model. This is a quick-fix and the wrong thing to do. It works only if the currently shown dive is changed, which is not a given. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0272f118ae
commit
b390fb368d
1 changed files with 9 additions and 3 deletions
|
@ -261,12 +261,18 @@ void MainTab::divesChanged(const QVector<dive *> &dives, DiveField field)
|
|||
}
|
||||
if (field.divesite)
|
||||
updateDiveSite(current_dive);
|
||||
if (field.tags)
|
||||
if (field.tags) {
|
||||
tagModel.updateModel(); // TODO: Don't do this here
|
||||
ui.tagWidget->setText(get_taglist_string(current_dive->tag_list));
|
||||
if (field.buddy)
|
||||
}
|
||||
if (field.buddy) {
|
||||
buddyModel.updateModel(); // TODO: Don't do this here
|
||||
ui.buddy->setText(current_dive->buddy);
|
||||
if (field.divemaster)
|
||||
}
|
||||
if (field.divemaster) {
|
||||
diveMasterModel.updateModel(); // TODO: Don't do this here
|
||||
ui.divemaster->setText(current_dive->divemaster);
|
||||
}
|
||||
|
||||
// If duration or depth changed, the profile needs to be replotted
|
||||
if (field.duration || field.depth)
|
||||
|
|
Loading…
Reference in a new issue