Merge branch 'xxSeys1-ScrollContentPanelNavBarToCurrentFolder'
This commit is contained in:
@@ -229,6 +229,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>
|
||||
|
||||
@@ -561,7 +561,7 @@ namespace FlaxEditor.Windows
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables vertical and horizontal scrolling on the content tree panel
|
||||
/// Enables or disables vertical and horizontal scrolling on the content tree panel
|
||||
/// </summary>
|
||||
/// <param name="enabled">The state to set scrolling to</param>
|
||||
public void ScrollingOnTreeView(bool enabled)
|
||||
@@ -573,7 +573,7 @@ namespace FlaxEditor.Windows
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables vertical and horizontal scrolling on the content view panel
|
||||
/// Enables or disables vertical and horizontal scrolling on the content view panel
|
||||
/// </summary>
|
||||
/// <param name="enabled">The state to set scrolling to</param>
|
||||
public void ScrollingOnContentView(bool enabled)
|
||||
@@ -1572,6 +1572,7 @@ namespace FlaxEditor.Windows
|
||||
PerformLayout();
|
||||
}
|
||||
UpdateViewDropdownBounds();
|
||||
ScrollNavigationBarToCurrentFolder();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1852,6 +1853,14 @@ namespace FlaxEditor.Windows
|
||||
return base.OnMouseUp(location, button);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnSizeChanged()
|
||||
{
|
||||
base.OnSizeChanged();
|
||||
|
||||
ScrollNavigationBarToCurrentFolder();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void PerformLayoutAfterChildren()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user