mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive edit: don't free the taglist of the master dive
We do all of our edits on a copy of the dive - but the tag_list points to the tag_list of the master dive (based on how we create that copy of the master dive). So only free the tag_list if it is already different from the master dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a12b10c008
commit
c5437c7499
1 changed files with 2 additions and 1 deletions
|
@ -960,7 +960,8 @@ void MainTab::on_tagWidget_textChanged()
|
|||
if (editMode == NONE)
|
||||
return;
|
||||
QString tag;
|
||||
taglist_free(editedDive.tag_list);
|
||||
if (editedDive.tag_list != current_dive->tag_list)
|
||||
taglist_free(editedDive.tag_list);
|
||||
editedDive.tag_list = NULL;
|
||||
Q_FOREACH (tag, ui.tagWidget->getBlockStringList())
|
||||
taglist_add_tag(&editedDive.tag_list, tag.toUtf8().data());
|
||||
|
|
Loading…
Add table
Reference in a new issue