Skip to content

Commit

Permalink
Ensure tags are not duplicates during bookmark load
Browse files Browse the repository at this point in the history
Duplicates can be introduced in several ways. User can add duplicate
tag now, but it seems tath past and current GQRX contains some bugs
related to bookmarks/tags and the saved content is sometimes crappy.
  • Loading branch information
jiri-pinkava committed Nov 18, 2022
1 parent eb079e3 commit 70c38d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/qtgui/bookmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ bool Bookmarks::load()
QStringList TagList = strTags.split(",");
for(int iTag=0; iTag<TagList.size(); ++iTag)
{
info.tags.append(&findOrAddTag(TagList[iTag].trimmed()));
TagInfo *tagInfo = &findOrAddTag(TagList[iTag]);
if (info.tags.indexOf(tagInfo) == -1) {
info.tags.append(tagInfo);
}
}

m_BookmarkList.append(info);
Expand Down

0 comments on commit 70c38d4

Please sign in to comment.