Skip to content

Commit

Permalink
Fix bug causing Keyword toggles to behave erratically (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
LumineTheMeme authored May 28, 2023
1 parent da29adb commit c4b9f78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MaterialEditor.Base/UI/UI.ListEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,9 @@ void onChanged(Color c)
case ItemInfo.RowItemType.KeywordProperty:
ShowKeyword();
SetLabelText(KeywordLabel, item.LabelText, item.KeywordValue != item.KeywordValueOriginal);
KeywordToggle.isOn = item.KeywordValue;
KeywordToggle.onValueChanged.RemoveAllListeners();

KeywordToggle.isOn = item.KeywordValue;
KeywordToggle.onValueChanged.AddListener(value =>
{
item.KeywordValue = value;
Expand Down

0 comments on commit c4b9f78

Please sign in to comment.