mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 02:40:24 +08:00
feature: remember the last active tab index in lfs-image diff view
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -261,6 +261,12 @@ namespace SourceGit.ViewModels
|
||||
set => SetProperty(ref _useBlockNavigationInDiffView, value);
|
||||
}
|
||||
|
||||
public int LFSImageDiffActiveIdx
|
||||
{
|
||||
get => _lfsImageDiffActiveIdx;
|
||||
set => SetProperty(ref _lfsImageDiffActiveIdx, value);
|
||||
}
|
||||
|
||||
public Models.ChangeViewMode UnstagedChangeViewMode
|
||||
{
|
||||
get => _unstagedChangeViewMode;
|
||||
@@ -687,6 +693,7 @@ namespace SourceGit.ViewModels
|
||||
private bool _showHiddenSymbolsInDiffView = false;
|
||||
private bool _useFullTextDiff = false;
|
||||
private bool _useBlockNavigationInDiffView = false;
|
||||
private int _lfsImageDiffActiveIdx = 0;
|
||||
|
||||
private Models.ChangeViewMode _unstagedChangeViewMode = Models.ChangeViewMode.List;
|
||||
private Models.ChangeViewMode _stagedChangeViewMode = Models.ChangeViewMode.List;
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
|
||||
<!-- LFS Image Diff -->
|
||||
<DataTemplate DataType="vm:LFSImageDiff">
|
||||
<TabControl Margin="0,8,0,0">
|
||||
<TabControl Margin="0,8,0,0" SelectedIndex="{Binding Source={x:Static vm:Preferences.Instance}, Path=LFSImageDiffActiveIdx, Mode=TwoWay}">
|
||||
<TabControl.Styles>
|
||||
<Style Selector="TabControl /template/ ItemsPresenter#PART_ItemsPresenter > WrapPanel">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
|
||||
Reference in New Issue
Block a user