Merge remote-tracking branch 'origin/1.2' into ui-achorpopup-shiftctrl-modes

This commit is contained in:
honzapatCZ
2021-04-06 16:44:45 +02:00
4 changed files with 18 additions and 8 deletions

View File

@@ -75,6 +75,7 @@ namespace FlaxEditor.Content
}
}
/// <inheritdoc />
public int MetadataToken => 0;
/// <inheritdoc />

View File

@@ -250,6 +250,15 @@ namespace FlaxEditor.CustomEditors
_children[i].RefreshInternal();
}
/// <summary>
/// Synchronizes the value of the <see cref="Values"/> container. Called during Refresh to flush property after editing it in UI.
/// </summary>
/// <param name="value">The value to set.</param>
protected virtual void SynchronizeValue(object value)
{
_values.Set(_parent.Values, value);
}
internal virtual void RefreshInternal()
{
if (_values == null)
@@ -264,7 +273,7 @@ namespace FlaxEditor.CustomEditors
_valueToSet = null;
// Assign value
_values.Set(_parent.Values, val);
SynchronizeValue(val);
// Propagate values up (eg. when member of structure gets modified, also structure should be updated as a part of the other object)
var obj = _parent;