Don't setup context menu in the initialization code.

This commit is contained in:
Rich 2015-09-01 13:11:39 +00:00
parent 11d58df488
commit e46075e675

View File

@ -144,7 +144,8 @@ namespace Volian.Controls.Library
gpSrchAnnoText.Enabled = true; gpSrchAnnoText.Enabled = true;
cmbResultsStyle.Enabled = false; cmbResultsStyle.Enabled = false;
tabSearchTypes.SelectedTabChanged += new TabStrip.SelectedTabChangedEventHandler(tabSearchTypes_SelectedTabChanged); 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) void tabSearchTypes_SelectedTabChanged(object sender, TabStripTabChangedEventArgs e)
@ -1661,8 +1662,8 @@ namespace Volian.Controls.Library
else if (cbxTextSearchText.Focused) else if (cbxTextSearchText.Focused)
cbxTextSearchText.SelectedText = "\u00A0"; cbxTextSearchText.SelectedText = "\u00A0";
} }
// Changed to a public so that it could be called after the /DB parameter has been processed
private void SetupContextMenu() public void SetupContextMenu()
{ {
galSymbols.SubItems.Clear(); galSymbols.SubItems.Clear();
// Bug fix B2014-057 // Bug fix B2014-057