debug tweak; extra null check on EventSystem.current
This commit is contained in:
@@ -36,8 +36,7 @@ namespace UIFixes
|
|||||||
|
|
||||||
foreach (ItemContextClass itemContext in MultiSelect.ItemContexts)
|
foreach (ItemContextClass itemContext in MultiSelect.ItemContexts)
|
||||||
{
|
{
|
||||||
builder.AppendFormat("x{0} {1}", itemContext.Item.StackObjectsCount, itemContext.Item.ToString());
|
builder.AppendFormat("x{0} {1}\n", itemContext.Item.StackObjectsCount, itemContext.Item.ToString());
|
||||||
builder.AppendLine();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MultiSelect.SecondaryContexts.Any())
|
if (MultiSelect.SecondaryContexts.Any())
|
||||||
@@ -45,8 +44,7 @@ namespace UIFixes
|
|||||||
builder.AppendFormat("Secondary Items: <color=yellow>{0}</color>\n", MultiSelect.SecondaryCount);
|
builder.AppendFormat("Secondary Items: <color=yellow>{0}</color>\n", MultiSelect.SecondaryCount);
|
||||||
foreach (ItemContextClass itemContext in MultiSelect.SecondaryContexts)
|
foreach (ItemContextClass itemContext in MultiSelect.SecondaryContexts)
|
||||||
{
|
{
|
||||||
builder.Append(itemContext.Item.ToString());
|
builder.AppendFormat("x{0} {1}\n", itemContext.Item.StackObjectsCount, itemContext.Item.ToString());
|
||||||
builder.AppendLine();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ namespace UIFixes
|
|||||||
{
|
{
|
||||||
// Need an item context to operate on, and ignore these keypresses if there's a focused textbox somewhere
|
// Need an item context to operate on, and ignore these keypresses if there's a focused textbox somewhere
|
||||||
ItemContextAbstractClass itemContext = __instance.R().ItemContext;
|
ItemContextAbstractClass itemContext = __instance.R().ItemContext;
|
||||||
if (itemContext == null || EventSystem.current.currentSelectedGameObject?.GetComponent<TMP_InputField>() != null)
|
if (itemContext == null || EventSystem.current?.currentSelectedGameObject?.GetComponent<TMP_InputField>() != null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user