mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 00:08:51 -05:00
Fix instance value resolvers on array element uses array as target instead of owner
This commit is contained in:
parent
ac647eb85a
commit
b969569ae7
@ -49,7 +49,7 @@ namespace TriInspector.Resolvers
|
||||
|
||||
public override void InvokeForTarget(TriProperty property, int targetIndex)
|
||||
{
|
||||
var parentValue = property.Parent.GetValue(targetIndex);
|
||||
var parentValue = property.Owner.GetValue(targetIndex);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ namespace TriInspector.Resolvers
|
||||
|
||||
public override T GetValue(TriProperty property, T defaultValue = default)
|
||||
{
|
||||
var parentValue = property.Parent.GetValue(0);
|
||||
var parentValue = property.Owner.GetValue(0);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ namespace TriInspector.Resolvers
|
||||
|
||||
public override T GetValue(TriProperty property, T defaultValue = default)
|
||||
{
|
||||
var parentValue = property.Parent.GetValue(0);
|
||||
var parentValue = property.Owner.GetValue(0);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ namespace TriInspector.Resolvers
|
||||
|
||||
public override T GetValue(TriProperty property, T defaultValue = default)
|
||||
{
|
||||
var parentValue = property.Parent.GetValue(0);
|
||||
var parentValue = property.Owner.GetValue(0);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -81,6 +81,9 @@ namespace TriInspector
|
||||
[PublicAPI]
|
||||
public TriProperty Parent { get; }
|
||||
|
||||
[PublicAPI]
|
||||
public TriProperty Owner => IsArrayElement ? Parent.Owner : Parent;
|
||||
|
||||
[PublicAPI]
|
||||
public bool IsRootProperty => Parent == null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user