Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b62c484

Browse files
committed
Added ToggleTwoSideDiff(), so we can refresh change-block indicator
1 parent 7a70890 commit b62c484

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

‎src/ViewModels/DiffContext.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ public void DecrUnified()
145145
LoadDiffContent();
146146
}
147147

148+
public void ToggleTwoSideDiff()
149+
{
150+
Preference.Instance.UseSideBySideDiff = !Preference.Instance.UseSideBySideDiff;
151+
RefreshChangeBlockIndicator();
152+
}
153+
148154
public void OpenExternalMergeTool()
149155
{
150156
var toolType = Preference.Instance.ExternalMergeToolType;

‎src/Views/DiffView.axaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@
131131

132132
<ToggleButton Classes="line_path"
133133
Width="28" Height="18"
134-
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSideBySideDiff, Mode=TwoWay}"
134+
Command="{Binding ToggleTwoSideDiff}"
135+
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSideBySideDiff, Mode=OneWay}"
135136
IsVisible="{Binding IsTextDiff}"
136137
ToolTip.Tip="{DynamicResource Text.Diff.SideBySide}">
137138
<Path Width="12" Height="12" Data="{StaticResource Icons.LayoutHorizontal}" Margin="0,2,0,0"/>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /