mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 10:50:52 +08:00
fix<WorkingCopy>: force trigger DataGrid layout update to fix bad column with issue
This commit is contained in:
@@ -231,7 +231,7 @@
|
||||
<TreeView
|
||||
Grid.Row="1"
|
||||
x:Name="stageTree"
|
||||
ItemsSource="{Binding ElementName=me, Path=StagedTreeData, IsAsync=True}"
|
||||
ItemsSource="{Binding ElementName=me, Path=StagedTreeData, IsAsync=False}"
|
||||
Visibility="{Binding Source={x:Static source:App.Setting}, Path=UI.StagedFileDisplayMode, Converter={StaticResource FilesDisplayModeToTree}}"
|
||||
Background="{StaticResource Brush.Contents}"
|
||||
FontFamily="Consolas"
|
||||
@@ -286,7 +286,7 @@
|
||||
<DataGrid
|
||||
Grid.Row="1"
|
||||
x:Name="stageList"
|
||||
ItemsSource="{Binding ElementName=me, Path=StagedListData, IsAsync=True}"
|
||||
ItemsSource="{Binding ElementName=me, Path=StagedListData, IsAsync=False}"
|
||||
RowHeight="24"
|
||||
Visibility="{Binding Source={x:Static source:App.Setting}, Path=UI.StagedFileDisplayMode, Converter={StaticResource FilesDisplayModeToList}}"
|
||||
SelectionChanged="StagedListSelectionChanged"
|
||||
|
||||
@@ -114,6 +114,12 @@ namespace SourceGit.UI {
|
||||
UpdateData(unstaged, UnstagedListData, UnstagedTreeData);
|
||||
UpdateData(staged, StagedListData, StagedTreeData);
|
||||
|
||||
// Force trigger UpdateLayout for DataGrid.
|
||||
unstagedList.Columns.Add(new DataGridTextColumn());
|
||||
unstagedList.Columns.RemoveAt(unstagedList.Columns.Count - 1);
|
||||
stageList.Columns.Add(new DataGridTextColumn());
|
||||
stageList.Columns.RemoveAt(stageList.Columns.Count - 1);
|
||||
|
||||
var current = Repo.CurrentBranch();
|
||||
if (current != null && !string.IsNullOrEmpty(current.Upstream) && chkAmend.IsChecked != true) {
|
||||
btnCommitAndPush.Visibility = Visibility.Visible;
|
||||
|
||||
Reference in New Issue
Block a user