From 89b4c8f9214704478b4bc9fd4ecb3b0268652de9 Mon Sep 17 00:00:00 2001 From: bd_ Date: Wed, 4 Sep 2024 12:41:00 -0700 Subject: [PATCH] fix: deactivating an inactive menu item doesn't work as expected (#1102) --- Editor/ReactiveObjects/Simulator/ROSimulator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Editor/ReactiveObjects/Simulator/ROSimulator.cs b/Editor/ReactiveObjects/Simulator/ROSimulator.cs index e3a1be0f..10182deb 100644 --- a/Editor/ReactiveObjects/Simulator/ROSimulator.cs +++ b/Editor/ReactiveObjects/Simulator/ROSimulator.cs @@ -133,7 +133,7 @@ namespace nadena.dev.modular_avatar.core.editor.Simulator } else { - if (MenuItemOverrides.Value.TryGetValue(prop, out var existing) && ReferenceEquals(existing, item)) + if (!MenuItemOverrides.Value.TryGetValue(prop, out var existing) || ReferenceEquals(existing, item)) MenuItemOverrides.Value = MenuItemOverrides.Value.SetItem(prop, null); }