mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 21:30:37 +08:00
fix: left LineNumberMargin in text editor did not update its width
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -115,12 +115,6 @@ namespace SourceGit.Views
|
||||
return new Size(test.Width, 0);
|
||||
}
|
||||
|
||||
protected override void OnDataContextChanged(EventArgs e)
|
||||
{
|
||||
base.OnDataContextChanged(e);
|
||||
InvalidateMeasure();
|
||||
}
|
||||
|
||||
private readonly bool _usePresenter;
|
||||
private readonly bool _isOld;
|
||||
}
|
||||
@@ -585,6 +579,13 @@ namespace SourceGit.Views
|
||||
protected override void OnDataContextChanged(EventArgs e)
|
||||
{
|
||||
base.OnDataContextChanged(e);
|
||||
|
||||
foreach (var margin in TextArea.LeftMargins)
|
||||
{
|
||||
if (margin is LineNumberMargin)
|
||||
margin.InvalidateMeasure();
|
||||
}
|
||||
|
||||
AutoScrollToFirstChange();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user