mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-30 10:12:59 +08:00
feat: allow multi-edit of "Is Default" when parameter names are empty (#1350)
This commit is contained in:
parent
d23b9f94a2
commit
e68e176aa4
@ -521,7 +521,12 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
// But, we do want to see if _any_ are default.
|
||||
var anyIsDefault = _prop_isDefault.hasMultipleDifferentValues || _prop_isDefault.boolValue;
|
||||
var mixedIsDefault = multipleSelections && anyIsDefault;
|
||||
using (new EditorGUI.DisabledScope(multipleSelections || isDefaultByKnownParam != null))
|
||||
|
||||
var allAreAutoParams = !_parameterName.hasMultipleDifferentValues &&
|
||||
string.IsNullOrWhiteSpace(_parameterName.stringValue);
|
||||
|
||||
using (new EditorGUI.DisabledScope((!allAreAutoParams && multipleSelections) ||
|
||||
isDefaultByKnownParam != null))
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
DrawHorizontalToggleProp(_prop_isDefault, G("menuitem.prop.is_default"), mixedIsDefault,
|
||||
|
Loading…
Reference in New Issue
Block a user