Refactor ISceneContextWindow into ISceneEditingContext with more utilities
#3257
This commit is contained in:
@@ -41,7 +41,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
public override Undo Undo => _window.Undo;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override List<SceneGraphNode> Selection => _window.Selection;
|
||||
public override ISceneEditingContext SceneContext => _window;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -12,10 +12,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
{
|
||||
public sealed partial class PrefabWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// The current selection (readonly).
|
||||
/// </summary>
|
||||
public readonly List<SceneGraphNode> Selection = new List<SceneGraphNode>();
|
||||
private readonly List<SceneGraphNode> _selection = new List<SceneGraphNode>();
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when selection gets changed.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using FlaxEditor.Content;
|
||||
using FlaxEditor.CustomEditors;
|
||||
@@ -19,7 +20,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
/// </summary>
|
||||
/// <seealso cref="Prefab" />
|
||||
/// <seealso cref="FlaxEditor.Windows.Assets.AssetEditorWindow" />
|
||||
public sealed partial class PrefabWindow : AssetEditorWindowBase<Prefab>, IPresenterOwner, ISceneContextWindow
|
||||
public sealed partial class PrefabWindow : AssetEditorWindowBase<Prefab>, IPresenterOwner, ISceneEditingContext
|
||||
{
|
||||
private readonly SplitPanel _split1;
|
||||
private readonly SplitPanel _split2;
|
||||
@@ -54,6 +55,9 @@ namespace FlaxEditor.Windows.Assets
|
||||
/// </summary>
|
||||
public PrefabWindowViewport Viewport => _viewport;
|
||||
|
||||
/// <inheritdoc />
|
||||
public List<SceneGraphNode> Selection => _selection;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the prefab objects properties editor.
|
||||
/// </summary>
|
||||
@@ -557,5 +561,8 @@ namespace FlaxEditor.Windows.Assets
|
||||
|
||||
/// <inheritdoc />
|
||||
public EditorViewport PresenterViewport => _viewport;
|
||||
|
||||
/// <inheritdoc />
|
||||
EditorViewport ISceneEditingContext.Viewport => Viewport;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user