From a660b797cf6584fe1580779de54cd0d80a517e5d Mon Sep 17 00:00:00 2001 From: Alexander Heidn <40741234+HerrKnarz@users.noreply.github.com> Date: Tue, 29 Oct 2024 23:58:53 +0100 Subject: [PATCH] Fixed bug when closing add item dialog, fixed formatting of settings and changed link to prefixes help page. --- .../Models/MetadataObjects.cs | 5 +++ .../Properties/AssemblyInfo.cs | 4 +-- .../ViewModels/SettingsViewModel.cs | 2 +- .../MetadataUtilities/Views/SettingsView.xaml | 34 ++++++++++++------- Generic/MetadataUtilities/extension.yaml | 2 +- Manifest/HerrKnarz_MetadataUtilities.yaml | 8 +++++ 6 files changed, 38 insertions(+), 17 deletions(-) diff --git a/Generic/MetadataUtilities/Models/MetadataObjects.cs b/Generic/MetadataUtilities/Models/MetadataObjects.cs index 6c10e992a..7d3b2cfb3 100644 --- a/Generic/MetadataUtilities/Models/MetadataObjects.cs +++ b/Generic/MetadataUtilities/Models/MetadataObjects.cs @@ -65,6 +65,11 @@ public MetadataObject AddNewItem(FieldType type, string prefix = "", bool enable { var newItem = ControlCenter.AddNewItem(type, prefix, enableTypeSelection, addToDb); + if (newItem == null) + { + return null; + } + if (this.Any(x => x.TypeAndName == newItem.TypeAndName)) { return null; diff --git a/Generic/MetadataUtilities/Properties/AssemblyInfo.cs b/Generic/MetadataUtilities/Properties/AssemblyInfo.cs index dc3e5075a..f3baaf2eb 100644 --- a/Generic/MetadataUtilities/Properties/AssemblyInfo.cs +++ b/Generic/MetadataUtilities/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // // 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.5.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] \ No newline at end of file diff --git a/Generic/MetadataUtilities/ViewModels/SettingsViewModel.cs b/Generic/MetadataUtilities/ViewModels/SettingsViewModel.cs index 51bbb6048..baef4d093 100644 --- a/Generic/MetadataUtilities/ViewModels/SettingsViewModel.cs +++ b/Generic/MetadataUtilities/ViewModels/SettingsViewModel.cs @@ -201,7 +201,7 @@ public RelayCommand HelpMergingCommand public RelayCommand HelpPrefixesCommand => new RelayCommand(() - => Process.Start(new ProcessStartInfo("https://knarzwerk.de/en/playnite-extensions/metadata-utilities/other-functionality/#prefixes"))); + => Process.Start(new ProcessStartInfo("https://knarzwerk.de/en/playnite-extensions/metadata-utilities/prefixes"))); public RelayCommand HelpQuickAddCommand => new RelayCommand(() diff --git a/Generic/MetadataUtilities/Views/SettingsView.xaml b/Generic/MetadataUtilities/Views/SettingsView.xaml index 9b8acdad2..6b4b1f6d8 100644 --- a/Generic/MetadataUtilities/Views/SettingsView.xaml +++ b/Generic/MetadataUtilities/Views/SettingsView.xaml @@ -126,7 +126,7 @@ -