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)
|
else if (Root != null && Root.RootModule == this)
|
||||||
{
|
{
|
||||||
Root.RootModule = null;
|
var root = Root;
|
||||||
Root.NotifyLayoutEmpty();
|
root.RootModule = null;
|
||||||
|
root.NotifyLayoutEmpty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,8 @@
|
|||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
ScrollViewer.HorizontalScrollMode="Disabled"
|
ScrollViewer.HorizontalScrollMode="Disabled"
|
||||||
SelectionChanged="PART_FilesView_SelectionChanged"
|
SelectionChanged="PART_FilesView_SelectionChanged"
|
||||||
SelectionMode="Single">
|
SelectionMode="Single"
|
||||||
|
SizeChanged="PART_FilesView_SizeChanged">
|
||||||
<ItemsView.ItemTemplate>
|
<ItemsView.ItemTemplate>
|
||||||
<DataTemplate x:DataType="model:ExplorerItem">
|
<DataTemplate x:DataType="model:ExplorerItem">
|
||||||
<ItemContainer>
|
<ItemContainer>
|
||||||
|
|||||||
@@ -107,6 +107,14 @@ internal sealed partial class ProjectBrowser : UserControl
|
|||||||
_isUpdatingSelection = false;
|
_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)
|
private async void PART_FilesView_DoubleTapped(object sender, Microsoft.UI.Xaml.Input.DoubleTappedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (PART_FilesView.SelectedItem is ExplorerItem selectedItem)
|
if (PART_FilesView.SelectedItem is ExplorerItem selectedItem)
|
||||||
|
|||||||
Reference in New Issue
Block a user