fix: menu item settings are overwritten when selecting multiple menu items (#999)

Closes: #994
This commit is contained in:
bd_ 2024-08-12 19:13:28 -07:00 committed by GitHub
parent 3838014517
commit 622d846b9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -172,7 +172,9 @@ namespace nadena.dev.modular_avatar.core.editor
var rect = EditorGUILayout.GetControlRect(GUILayout.Width(width));
EditorGUI.BeginProperty(rect, label, prop);
prop.boolValue = EditorGUI.ToggleLeft(rect, label, prop.boolValue);
EditorGUI.BeginChangeCheck();
var value = EditorGUI.ToggleLeft(rect, label, prop.boolValue);
if (EditorGUI.EndChangeCheck()) prop.boolValue = value;
EditorGUI.EndProperty();
}