mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-26 21:17:20 -08:00
fix: crash due to font family name is an empty space (#745)
This commit is contained in:
parent
bb41fcea3e
commit
4fc32b2b59
1 changed files with 4 additions and 2 deletions
|
@ -65,7 +65,8 @@ namespace SourceGit.ViewModels
|
||||||
get => _defaultFontFamily;
|
get => _defaultFontFamily;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (SetProperty(ref _defaultFontFamily, value) && !_isLoading)
|
var trimmed = value.Trim();
|
||||||
|
if (SetProperty(ref _defaultFontFamily, trimmed) && !_isLoading)
|
||||||
App.SetFonts(_defaultFontFamily, _monospaceFontFamily, _onlyUseMonoFontInEditor);
|
App.SetFonts(_defaultFontFamily, _monospaceFontFamily, _onlyUseMonoFontInEditor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +76,8 @@ namespace SourceGit.ViewModels
|
||||||
get => _monospaceFontFamily;
|
get => _monospaceFontFamily;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (SetProperty(ref _monospaceFontFamily, value) && !_isLoading)
|
var trimmed = value.Trim();
|
||||||
|
if (SetProperty(ref _monospaceFontFamily, trimmed) && !_isLoading)
|
||||||
App.SetFonts(_defaultFontFamily, _monospaceFontFamily, _onlyUseMonoFontInEditor);
|
App.SetFonts(_defaultFontFamily, _monospaceFontFamily, _onlyUseMonoFontInEditor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue