Skip to content

Commit

Permalink
Stop save button from getting disabled when generating font.
Browse files Browse the repository at this point in the history
  • Loading branch information
iminashi committed May 5, 2019
1 parent e9a79e4 commit dad5249
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions RocksmithFontGenerator/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.19.56")]
[assembly: AssemblyFileVersion("1.1.19.56")]
[assembly: AssemblyVersion("1.1.21.125")]
[assembly: AssemblyFileVersion("1.1.21.125")]
[assembly: NeutralResourcesLanguage("en")]

2 changes: 1 addition & 1 deletion RocksmithFontGenerator/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion RocksmithFontGenerator/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,6 @@
<value>Dark Theme</value>
</data>
<data name="UI_Label_SpacingAdjustment_Tooltip" xml:space="preserve">
<value>Reducing this value will reduce the gap between characters.</value>
<value>Lowering this value will reduce the gap between characters.</value>
</data>
</root>
4 changes: 2 additions & 2 deletions RocksmithFontGenerator/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,14 @@ private async Task GenerateFont_Impl()

FontGenerator.SetFont(fontFamily, SelectedFontWeight.Weight, fontSize, jpFontSize);

CanSave = false;

// Generating the font will block the thread
// But invoke it anyway so that the UI has time to update (change mouse cursor etc)
GenerationResult result = await Application.Current.Dispatcher.InvokeAsync(
() => FontGenerator.TryGenerateFont(),
DispatcherPriority.Background);

CanSave = false;

switch (result)
{
case GenerationResult.Success:
Expand Down

0 comments on commit dad5249

Please sign in to comment.