Fix regression in function surfaces

This commit is contained in:
Wojtek Figat
2024-09-14 23:25:59 +02:00
parent 49eeb7bf9a
commit 2a29b8e807
4 changed files with 18 additions and 8 deletions

View File

@@ -32,6 +32,7 @@ namespace FlaxEditor.Windows.Assets
_surface.ContextChanged += OnSurfaceContextChanged;
// Toolstrip
SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton);
_toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/animation/anim-graph/index.html")).LinkTooltip("See documentation to learn more");

View File

@@ -28,6 +28,7 @@ namespace FlaxEditor.Windows.Assets
};
// Toolstrip
SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton);
_toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/graphics/materials/index.html")).LinkTooltip("See documentation to learn more");
}

View File

@@ -28,6 +28,7 @@ namespace FlaxEditor.Windows.Assets
};
// Toolstrip
SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton);
_toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/particles/index.html")).LinkTooltip("See documentation to learn more");
}

View File

@@ -27,9 +27,21 @@ namespace FlaxEditor.Windows.Assets
/// </summary>
protected readonly Panel _panel;
private readonly ToolStripButton _saveButton;
private readonly ToolStripButton _undoButton;
private readonly ToolStripButton _redoButton;
/// <summary>
/// Save button.
/// </summary>
protected ToolStripButton _saveButton;
/// <summary>
/// Undo button.
/// </summary>
protected ToolStripButton _undoButton;
/// <summary>
/// Redo button.
/// </summary>
protected ToolStripButton _redoButton;
private bool _showWholeGraphOnLoad = true;
/// <summary>
@@ -61,17 +73,12 @@ namespace FlaxEditor.Windows.Assets
protected VisjectFunctionSurfaceWindow(Editor editor, AssetItem item)
: base(editor, item)
{
var inputOptions = Editor.Options.Options.Input;
// Undo
_undo = new Undo();
_undo.UndoDone += OnUndoRedo;
_undo.RedoDone += OnUndoRedo;
_undo.ActionDone += OnUndoRedo;
// Toolstrip
SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton);
// Panel
_panel = new Panel(ScrollBars.None)
{