mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
After editing tags, get the right tags into the displayed dive
We forgot to clear out the pre-existing tags. We did this for the actual selected dives that were being edited, but not for the displayed_dive, so deleted tags showed up again on screen (even though they were correctly deleted from the selected dives in the dive list). Fixes #732 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d2567f761a
commit
fa5c713f73
1 changed files with 2 additions and 0 deletions
|
@ -997,6 +997,8 @@ void MainTab::on_timeEdit_timeChanged(const QTime &time)
|
||||||
void MainTab::saveTags()
|
void MainTab::saveTags()
|
||||||
{
|
{
|
||||||
struct dive *cd = current_dive;
|
struct dive *cd = current_dive;
|
||||||
|
taglist_free(displayed_dive.tag_list);
|
||||||
|
displayed_dive.tag_list = NULL;
|
||||||
Q_FOREACH (const QString& tag, ui.tagWidget->getBlockStringList())
|
Q_FOREACH (const QString& tag, ui.tagWidget->getBlockStringList())
|
||||||
taglist_add_tag(&displayed_dive.tag_list, tag.toUtf8().data());
|
taglist_add_tag(&displayed_dive.tag_list, tag.toUtf8().data());
|
||||||
taglist_cleanup(&displayed_dive.tag_list);
|
taglist_cleanup(&displayed_dive.tag_list);
|
||||||
|
|
Loading…
Add table
Reference in a new issue