Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
BugFix: Tags can now be deselected from menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Wood committed Sep 17, 2019
1 parent e03dd98 commit afed774
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/UI/ExplorerFilterTagsSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,20 +166,15 @@ public void ToggleTagInExplorerFilter(TagContainerItem tagItem)
if(this.m_view != null && !this.m_isUpdating)
{
string tagName = tagItem.tagName.text;
bool isSelected = false;
StateToggleDisplay toggleComponent = tagItem.GetComponentInChildren<StateToggleDisplay>(true);

for(int i = 0; i < this.m_selectedTags.Length && !isSelected; ++i)
if(toggleComponent.isOn)
{
isSelected = (this.m_selectedTags[i] == tagName);
}

if(isSelected)
{
this.m_view.RemoveTagFromFilter(tagName);
this.m_view.AddTagToFilter(tagName);
}
else
{
this.m_view.AddTagToFilter(tagName);
this.m_view.RemoveTagFromFilter(tagName);
}
}
}
Expand Down

0 comments on commit afed774

Please sign in to comment.