From f4c2a30fd86099ad5ae2665bc54d2819fd453cc4 Mon Sep 17 00:00:00 2001 From: Raphael Winkler Date: Thu, 21 Jun 2018 20:45:18 +0200 Subject: [PATCH] Fixed a small bug in the about tab, about tab can now be accessed even if the initial configuration hasn't been done --- Osmo/Core/FixedValues.cs | 1 + Osmo/MainWindow.xaml.cs | 8 ++++++-- Osmo/Properties/AssemblyInfo.cs | 4 ++-- Osmo/UI/About.xaml | 4 ++-- Osmo/UI/About.xaml.cs | 8 +++++++- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Osmo/Core/FixedValues.cs b/Osmo/Core/FixedValues.cs index 6329faf..5fedd9d 100644 --- a/Osmo/Core/FixedValues.cs +++ b/Osmo/Core/FixedValues.cs @@ -26,6 +26,7 @@ internal static void InitializeReader() internal const int EDITOR_INDEX = 2; internal const int MIXER_INDEX = 3; internal const int CONFIG_INDEX = 5; + internal const int ABOUT_INDEX = 6; internal const int TEMPLATE_EDITOR_INDEX = 7; internal static SkinElementReader readerInterface; diff --git a/Osmo/MainWindow.xaml.cs b/Osmo/MainWindow.xaml.cs index 6d38402..d2b1f1b 100644 --- a/Osmo/MainWindow.xaml.cs +++ b/Osmo/MainWindow.xaml.cs @@ -50,9 +50,13 @@ private void UIElement_OnPreviewMouseLeftButtonUp(object sender, MouseButtonEven private void sidebarMenu_SelectionChanged(object sender, SelectionChangedEventArgs e) { - if (sidebarMenu.SelectedIndex != FixedValues.CONFIG_INDEX && !configuration.IsValid) + if (sidebarMenu.SelectedIndex != FixedValues.ABOUT_INDEX) { - sidebarMenu.SelectedIndex = FixedValues.CONFIG_INDEX; + if (sidebarMenu.SelectedIndex != FixedValues.CONFIG_INDEX && + !configuration.IsValid) + { + sidebarMenu.SelectedIndex = FixedValues.CONFIG_INDEX; + } } //until we had a StaysOpen glag to Drawer, this will help with scroll bars diff --git a/Osmo/Properties/AssemblyInfo.cs b/Osmo/Properties/AssemblyInfo.cs index 11280b8..9846759 100644 --- a/Osmo/Properties/AssemblyInfo.cs +++ b/Osmo/Properties/AssemblyInfo.cs @@ -51,5 +51,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("0.1.0.0")] -[assembly: AssemblyFileVersion("0.1.0.0")] +[assembly: AssemblyVersion("0.0.1.50")] +[assembly: AssemblyFileVersion("0.0.1.50")] diff --git a/Osmo/UI/About.xaml b/Osmo/UI/About.xaml index d0cdcb2..859cecb 100644 --- a/Osmo/UI/About.xaml +++ b/Osmo/UI/About.xaml @@ -23,13 +23,13 @@ - + - + diff --git a/Osmo/UI/About.xaml.cs b/Osmo/UI/About.xaml.cs index 3463aaa..db98b80 100644 --- a/Osmo/UI/About.xaml.cs +++ b/Osmo/UI/About.xaml.cs @@ -24,6 +24,8 @@ public partial class About : UserControl { private static About instance; + private bool versionAdded; + public static About Instance { get @@ -46,7 +48,11 @@ private void GitHubLink_PreviewMouseDown(object sender, MouseButtonEventArgs e) private void UserControl_Loaded(object sender, RoutedEventArgs e) { - txt_header.Text += Assembly.GetExecutingAssembly().GetName().Version.ToString(); + if (!versionAdded) + { + txt_header.Text += Assembly.GetExecutingAssembly().GetName().Version.ToString(); + versionAdded = true; + } } } }