From a7c539764166439b49d37bc0ab043dd1601d1a4b Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 1 Mar 2023 22:47:52 +0100 Subject: [PATCH] Fix content window auto scrolling regression 656fcf984721bed3d95b4f8249a416f2e85c04ce --- Source/Editor/Windows/ContentWindow.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index 162382f03..0323b9730 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -325,10 +325,10 @@ namespace FlaxEditor.Windows Select(item, true); // Disable scrolling in content view - if (_split.Panel2.VScrollBar != null) - _split.Panel2.VScrollBar.ThumbEnabled = false; - if (_split.Panel2.HScrollBar != null) - _split.Panel2.HScrollBar.ThumbEnabled = false; + if (_contentViewPanel.VScrollBar != null) + _contentViewPanel.VScrollBar.ThumbEnabled = false; + if (_contentViewPanel.HScrollBar != null) + _contentViewPanel.HScrollBar.ThumbEnabled = false; ScrollingOnContentView(false); // Show rename popup @@ -339,10 +339,10 @@ namespace FlaxEditor.Windows popup.Closed += renamePopup => { // Restore scrolling in content view - if (_split.Panel2.VScrollBar != null) - _split.Panel2.VScrollBar.ThumbEnabled = true; - if (_split.Panel2.HScrollBar != null) - _split.Panel2.HScrollBar.ThumbEnabled = true; + if (_contentViewPanel.VScrollBar != null) + _contentViewPanel.VScrollBar.ThumbEnabled = true; + if (_contentViewPanel.HScrollBar != null) + _contentViewPanel.HScrollBar.ThumbEnabled = true; ScrollingOnContentView(true); // Check if was creating new element @@ -760,7 +760,7 @@ namespace FlaxEditor.Windows // Select and scroll to cover in view _view.Select(item); - _split.Panel2.ScrollViewTo(item, fastScroll); + _contentViewPanel.ScrollViewTo(item, fastScroll); // Focus _view.Focus();