From e46075e675a5d9c6472f7a53e69756ac0d413602 Mon Sep 17 00:00:00 2001 From: Rich Date: Tue, 1 Sep 2015 13:11:39 +0000 Subject: [PATCH] Don't setup context menu in the initialization code. --- PROMS/Volian.Controls.Library/DisplaySearch.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index a3404411..79daa7d9 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -144,7 +144,8 @@ namespace Volian.Controls.Library gpSrchAnnoText.Enabled = true; cmbResultsStyle.Enabled = false; tabSearchTypes.SelectedTabChanged += new TabStrip.SelectedTabChangedEventHandler(tabSearchTypes_SelectedTabChanged); - SetupContextMenu(); // so that the symbol list is available without selecting a procedure set or procedure + // Don't do this here. If you do then the /DB parameter has not yet been set, which will cause the database menu to be displayed + //SetupContextMenu(); // so that the symbol list is available without selecting a procedure set or procedure } void tabSearchTypes_SelectedTabChanged(object sender, TabStripTabChangedEventArgs e) @@ -1661,8 +1662,8 @@ namespace Volian.Controls.Library else if (cbxTextSearchText.Focused) cbxTextSearchText.SelectedText = "\u00A0"; } - - private void SetupContextMenu() + // Changed to a public so that it could be called after the /DB parameter has been processed + public void SetupContextMenu() { galSymbols.SubItems.Clear(); // Bug fix B2014-057