diff --git a/CUE4Parse b/CUE4Parse index 493afb80..cf93fb7a 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 493afb80e59c1c97f4c0435dcfd81c07bf4a553c +Subproject commit cf93fb7ad93af74994f736db6cc134250e165a53 diff --git a/FModel/App.xaml.cs b/FModel/App.xaml.cs index 16ad94dc..b10a118f 100644 --- a/FModel/App.xaml.cs +++ b/FModel/App.xaml.cs @@ -44,9 +44,9 @@ namespace FModel } if (!Directory.Exists(UserSettings.Default.OutputDirectory)) - { UserSettings.Default.OutputDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Output"); - } + if (!Directory.Exists(UserSettings.Default.ModelDirectory)) + UserSettings.Default.ModelDirectory = Path.Combine(UserSettings.Default.OutputDirectory, "Saves"); Directory.CreateDirectory(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FModel")); Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, "Backups")); diff --git a/FModel/Extensions/EnumExtensions.cs b/FModel/Extensions/EnumExtensions.cs index f5242580..400d91b1 100644 --- a/FModel/Extensions/EnumExtensions.cs +++ b/FModel/Extensions/EnumExtensions.cs @@ -1,8 +1,8 @@ -using FModel.Properties; using System; using System.ComponentModel; using System.Resources; using System.Runtime.CompilerServices; +using FModel.Properties; namespace FModel.Extensions { @@ -47,12 +47,12 @@ namespace FModel.Extensions } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static T ToEnum(this string value, T defaultValue) + public static T ToEnum(this string value, T defaultValue) where T : struct { - if (!Enum.TryParse(typeof(T), value, true, out var ret)) + if (!Enum.TryParse(value, true, out T ret)) return defaultValue; - return (T) ret; + return ret; } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -81,4 +81,4 @@ namespace FModel.Extensions return i == -1 ? (T) values.GetValue(values.Length - 1) : (T) values.GetValue(i); } } -} \ No newline at end of file +} diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj index 8a153b12..e5bc0c2f 100644 --- a/FModel/FModel.csproj +++ b/FModel/FModel.csproj @@ -6,8 +6,8 @@ true FModel.ico 4.1.0 - 4.1.0.1 - 4.1.0.1 + 4.1.0.2 + 4.1.0.2 false true win-x64 diff --git a/FModel/MainWindow.xaml b/FModel/MainWindow.xaml index 33c357cd..12a9ad50 100644 --- a/FModel/MainWindow.xaml +++ b/FModel/MainWindow.xaml @@ -94,7 +94,7 @@ - + @@ -147,18 +147,12 @@ - - @@ -397,7 +391,7 @@ - + @@ -525,7 +519,7 @@ - + @@ -799,19 +793,6 @@ - - - - - - - - - - - - + + + + + + + + + + +