mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-24 13:29:01 +08:00
isControlOnlyMenu flag changed to hasChildMenu flag. This one matches the early return.
This commit is contained in:
parent
ead1b69856
commit
07b9d2ae7e
@ -121,10 +121,10 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
}
|
}
|
||||||
|
|
||||||
VRCExpressionsMenu[] parentsMenus = parents.DefaultIfEmpty(installer.installTargetMenu).ToArray();
|
VRCExpressionsMenu[] parentsMenus = parents.DefaultIfEmpty(installer.installTargetMenu).ToArray();
|
||||||
bool isControlOnlyMenu = true;
|
bool hasChildMenu = false;
|
||||||
foreach (KeyValuePair<string, VRCExpressionsMenu> childMenu in childMenus)
|
foreach (KeyValuePair<string, VRCExpressionsMenu> childMenu in childMenus)
|
||||||
{
|
{
|
||||||
isControlOnlyMenu = false;
|
hasChildMenu = true;
|
||||||
ChildElement childElement = new ChildElement
|
ChildElement childElement = new ChildElement
|
||||||
{
|
{
|
||||||
menuName = childMenu.Key,
|
menuName = childMenu.Key,
|
||||||
@ -138,8 +138,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isControlOnlyMenu) return;
|
if (hasChildMenu) return;
|
||||||
{
|
|
||||||
foreach (VRCExpressionsMenu parentMenu in parentsMenus)
|
foreach (VRCExpressionsMenu parentMenu in parentsMenus)
|
||||||
{
|
{
|
||||||
TraverseMenu(parentMenu, new ChildElement
|
TraverseMenu(parentMenu, new ChildElement
|
||||||
@ -148,7 +147,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
isInstallerRoot = true
|
isInstallerRoot = true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TraverseMenu(VRCExpressionsMenu parent, ChildElement childElement)
|
private void TraverseMenu(VRCExpressionsMenu parent, ChildElement childElement)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user