fix: resolve root module null reference and itemsview scroll bug
This commit is contained in:
@@ -152,8 +152,9 @@ public abstract class DockContainer : DockModule
|
||||
}
|
||||
else if (Root != null && Root.RootModule == this)
|
||||
{
|
||||
Root.RootModule = null;
|
||||
Root.NotifyLayoutEmpty();
|
||||
var root = Root;
|
||||
root.RootModule = null;
|
||||
root.NotifyLayoutEmpty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,8 @@
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.HorizontalScrollMode="Disabled"
|
||||
SelectionChanged="PART_FilesView_SelectionChanged"
|
||||
SelectionMode="Single">
|
||||
SelectionMode="Single"
|
||||
SizeChanged="PART_FilesView_SizeChanged">
|
||||
<ItemsView.ItemTemplate>
|
||||
<DataTemplate x:DataType="model:ExplorerItem">
|
||||
<ItemContainer>
|
||||
|
||||
@@ -107,6 +107,14 @@ internal sealed partial class ProjectBrowser : UserControl
|
||||
_isUpdatingSelection = false;
|
||||
}
|
||||
|
||||
private void PART_FilesView_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||
{
|
||||
if (e.NewSize.Width > 0 && e.NewSize.Height > 0)
|
||||
{
|
||||
PART_FilesView.UpdateLayout();
|
||||
}
|
||||
}
|
||||
|
||||
private async void PART_FilesView_DoubleTapped(object sender, Microsoft.UI.Xaml.Input.DoubleTappedRoutedEventArgs e)
|
||||
{
|
||||
if (PART_FilesView.SelectedItem is ExplorerItem selectedItem)
|
||||
|
||||
Reference in New Issue
Block a user