From 76c532c6a62d750264fcface214ffa02d55d89ac Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Fri, 28 Sep 2018 13:40:40 -0700 Subject: [PATCH] Fix stack overflow (hopefully) The code that tries to make the last column of the Symbols and References windows exactly fit the window goes into an infinite loop for everybody except me. I'm removing the feature for now. --- SourceGen/AppForms/ProjectView.cs | 4 ++++ SourceGen/Program.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SourceGen/AppForms/ProjectView.cs b/SourceGen/AppForms/ProjectView.cs index 850510a..380bfed 100644 --- a/SourceGen/AppForms/ProjectView.cs +++ b/SourceGen/AppForms/ProjectView.cs @@ -3536,6 +3536,7 @@ namespace SourceGen.AppForms { UpdateLastSymbolColumnWidth(); } private void UpdateLastSymbolColumnWidth() { +#if false const int ADJ = 4; // fudge factor needed to prevent horizontal scrollbar int leftWidths = symbolListView.Columns[0].Width + symbolListView.Columns[1].Width; int lastWidth = symbolListView.Size.Width - leftWidths - ADJ; @@ -3543,6 +3544,7 @@ namespace SourceGen.AppForms { lastWidth = 0; } symbolListView.Columns[2].Width = lastWidth; +#endif AppSettings.Global.Dirty = true; } @@ -3709,6 +3711,7 @@ namespace SourceGen.AppForms { UpdateLastReferencesColumnWidth(); } private void UpdateLastReferencesColumnWidth() { +#if false const int ADJ = 4; // fudge factor needed to prevent horizontal scrollbar int leftWidths = referencesListView.Columns[0].Width + referencesListView.Columns[1].Width; @@ -3717,6 +3720,7 @@ namespace SourceGen.AppForms { lastWidth = 0; } referencesListView.Columns[2].Width = lastWidth; +#endif AppSettings.Global.Dirty = true; } diff --git a/SourceGen/Program.cs b/SourceGen/Program.cs index 5238a1c..030cbfc 100644 --- a/SourceGen/Program.cs +++ b/SourceGen/Program.cs @@ -21,7 +21,7 @@ namespace SourceGen { static class Program { // Version number applied to the program as a whole. public static readonly CommonUtil.Version ProgramVersion = - new CommonUtil.Version(1, 0, 0, CommonUtil.Version.PreRelType.Alpha, 1); + new CommonUtil.Version(1, 0, 0, CommonUtil.Version.PreRelType.Alpha, 2); /// /// The main entry point for the application.