diff --git a/Source/Editor/GUI/CurveEditor.Base.cs b/Source/Editor/GUI/CurveEditor.Base.cs
index 04b4b2f72..a48f36943 100644
--- a/Source/Editor/GUI/CurveEditor.Base.cs
+++ b/Source/Editor/GUI/CurveEditor.Base.cs
@@ -100,6 +100,11 @@ namespace FlaxEditor.GUI
///
public abstract Type ValueType { get; }
+ ///
+ /// Gets the main container control that holds the curve editor UI. Can be used to add custom controls to the curve editor.
+ ///
+ public abstract Panel MainPanel { get; }
+
///
/// 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.
///
diff --git a/Source/Editor/GUI/CurveEditor.cs b/Source/Editor/GUI/CurveEditor.cs
index 092cda707..6693dec30 100644
--- a/Source/Editor/GUI/CurveEditor.cs
+++ b/Source/Editor/GUI/CurveEditor.cs
@@ -633,6 +633,9 @@ namespace FlaxEditor.GUI
///
public override Type ValueType => typeof(T);
+ ///
+ public override Panel MainPanel => _mainPanel;
+
///
public override float? FPS
{
diff --git a/Source/Editor/GUI/Timeline/Tracks/CurvePropertyTrack.cs b/Source/Editor/GUI/Timeline/Tracks/CurvePropertyTrack.cs
index 7e974b54f..4fdc5bd89 100644
--- a/Source/Editor/GUI/Timeline/Tracks/CurvePropertyTrack.cs
+++ b/Source/Editor/GUI/Timeline/Tracks/CurvePropertyTrack.cs
@@ -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();
}
- ///
+ ///
public override void OnUndo()
{
base.OnUndo();