From b95dcc21b043824b53380299ec03715143f8b48f Mon Sep 17 00:00:00 2001 From: sphere Date: Sun, 24 Oct 2021 22:56:31 +0200 Subject: [PATCH] Always display ZB's version number in the title. --- Source/Core/Windows/MainForm.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index 42a0352..cdde40a 100644 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -417,14 +417,15 @@ namespace CodeImp.DoomBuilder.Windows //mxd private void UpdateTitle() { + string programname = Application.ProductName + " v" + General.ThisAssembly.GetName().Version.Major + "." + General.ThisAssembly.GetName().Version.Minor; // Map opened? - if(General.Map != null) + if (General.Map != null) { // Get nice name string maptitle = (!string.IsNullOrEmpty(General.Map.Data.MapInfo.Title) ? ": " + General.Map.Data.MapInfo.Title : ""); // Show map name and filename in caption - this.Text = (mapchanged ? "\u25CF " : "") + General.Map.FileTitle + " (" + General.Map.Options.CurrentName + ") - " + Application.ProductName; + this.Text = (mapchanged ? "\u25CF " : "") + General.Map.FileTitle + " (" + General.Map.Options.CurrentName + ") - " + programname; } else { @@ -432,7 +433,7 @@ namespace CodeImp.DoomBuilder.Windows #if DEBUG this.Text = Application.ProductName + " - DEVBUILD"; #else - this.Text = Application.ProductName + " v" + General.ThisAssembly.GetName().Version.Major + "." + General.ThisAssembly.GetName().Version.Minor; + this.Text = programname; #endif } }