Merge code on properties objects locking to use the same path for prefab and scene properties panels
This commit is contained in:
@@ -635,5 +635,11 @@ namespace FlaxEditor.Windows.Assets
|
||||
public void Select(List<SceneGraphNode> nodes)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public List<SceneGraphNode> Selection => new List<SceneGraphNode>();
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool LockSelection { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
/// <param name="before">The selection before the change.</param>
|
||||
public void OnSelectionChanged(SceneGraphNode[] before)
|
||||
{
|
||||
if (LockSelectedObjects)
|
||||
if (LockSelection)
|
||||
return;
|
||||
|
||||
Undo.AddAction(new SelectionChangeAction(before, Selection.ToArray(), OnSelectionUndo));
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
/// <summary>
|
||||
/// Indication of if the prefab window selection is locked on specific objects.
|
||||
/// </summary>
|
||||
public bool LockSelectedObjects
|
||||
public bool LockSelection
|
||||
{
|
||||
get => _lockSelection;
|
||||
set
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace FlaxEditor.Windows
|
||||
/// <summary>
|
||||
/// Indication of if the properties window is locked on specific objects.
|
||||
/// </summary>
|
||||
public bool LockObjects
|
||||
public bool LockSelection
|
||||
{
|
||||
get => _lockObjects;
|
||||
set
|
||||
@@ -87,9 +87,9 @@ namespace FlaxEditor.Windows
|
||||
if (Level.ScenesCount > 1)
|
||||
return;
|
||||
_actorScrollValues.Clear();
|
||||
if (LockObjects)
|
||||
if (LockSelection)
|
||||
{
|
||||
LockObjects = false;
|
||||
LockSelection = false;
|
||||
Presenter.Deselect();
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,7 @@ namespace FlaxEditor.Windows
|
||||
|
||||
private void OnSelectionChanged()
|
||||
{
|
||||
if (LockObjects)
|
||||
if (LockSelection)
|
||||
return;
|
||||
|
||||
// Update selected objects
|
||||
|
||||
Reference in New Issue
Block a user