auto scroll the content panel navigation bar to the current folder
This commit is contained in:
@@ -257,6 +257,17 @@ namespace FlaxEditor.Windows
|
||||
_navigationBar.IsLayoutLocked = wasLayoutLocked;
|
||||
_navigationBar.PerformLayout();
|
||||
UpdateNavigationBarBounds();
|
||||
|
||||
ScrollNavigationBarToCurrentFolder();
|
||||
}
|
||||
|
||||
private void ScrollNavigationBarToCurrentFolder()
|
||||
{
|
||||
if (_navigationBar != null && _navigationBar.ChildrenCount != 0 && _navigationBar.HScrollBar.Visible)
|
||||
{
|
||||
_navigationBar.HScrollBar.TargetValue = _navigationBar.HScrollBar.Maximum;
|
||||
_navigationBar.HScrollBar.FastScroll();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1774,6 +1774,14 @@ namespace FlaxEditor.Windows
|
||||
return base.OnMouseUp(location, button);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnSizeChanged()
|
||||
{
|
||||
base.OnSizeChanged();
|
||||
|
||||
ScrollNavigationBarToCurrentFolder();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void PerformLayoutBeforeChildren()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user