Skip to content

Commit

Permalink
Fix duplicates in TagsEditVM when clicking right mouse button on imag…
Browse files Browse the repository at this point in the history
…e tag
  • Loading branch information
ImoutoChan committed Feb 4, 2024
1 parent 4f41e49 commit 36fe4d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Support WebP format in FullScreenPreview
* Add splashscreen
* Show notes in full screen preview
* Fix duplicates in TagsEditVM when clicking right mouse button on image tag

### Harpy
* Add ability to download faved danbooru pictures through gelbooru
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ public void DraftAddTag(BindedTagVM tag)
var value = tag.Tag.IsCounter ? "Counter:1" : null;

var searchTagVm = new SearchTagVM(new SearchTag(tag.Tag, value));

if (SelectedTags.Any(x => x.Tag.Id == searchTagVm.Tag.Id && x.Value == searchTagVm.Value))
return;

SelectedTags.Add(searchTagVm);
}

Expand Down

0 comments on commit 36fe4d5

Please sign in to comment.