Fix timeline curve expanding to properly show whole curve area
This commit is contained in:
@@ -100,6 +100,11 @@ namespace FlaxEditor.GUI
|
||||
/// </summary>
|
||||
public abstract Type ValueType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the main container control that holds the curve editor UI. Can be used to add custom controls to the curve editor.
|
||||
/// </summary>
|
||||
public abstract Panel MainPanel { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The amount of frames per second of the curve animation (optional). Can be used to restrict the keyframes time values to the given time quantization rate.
|
||||
/// </summary>
|
||||
|
||||
@@ -633,6 +633,9 @@ namespace FlaxEditor.GUI
|
||||
/// <inheritdoc />
|
||||
public override Type ValueType => typeof(T);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Panel MainPanel => _mainPanel;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override float? FPS
|
||||
{
|
||||
|
||||
@@ -292,7 +292,15 @@ namespace FlaxEditor.GUI.Timeline.Tracks
|
||||
Height = IsExpanded ? _expandedHeight : CollapsedHeight;
|
||||
UpdateCurve();
|
||||
if (IsExpanded)
|
||||
{
|
||||
// Layout bug: whole curve showing after track resize needs panel scrolls bars s smoothing disabled and showing twice
|
||||
Curve.MainPanel.VScrollBar?.EnableSmoothing = false;
|
||||
Curve.MainPanel.HScrollBar?.EnableSmoothing = false;
|
||||
Curve.ShowWholeCurve();
|
||||
Curve.ShowWholeCurve();
|
||||
Curve.MainPanel.VScrollBar?.EnableSmoothing = true;
|
||||
Curve.MainPanel.HScrollBar?.EnableSmoothing = true;
|
||||
}
|
||||
|
||||
base.OnExpandedChanged();
|
||||
}
|
||||
@@ -311,7 +319,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
|
||||
UpdatePreviewValue();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <inheritdoc />
|
||||
public override void OnUndo()
|
||||
{
|
||||
base.OnUndo();
|
||||
|
||||
Reference in New Issue
Block a user