Skip to content

Commit

Permalink
Double clicking SQL statement in execution path now takes you to the …
Browse files Browse the repository at this point in the history
…SQL Statements tab with that statement selected.
  • Loading branch information
tslater2006 committed Nov 21, 2019
1 parent 50f7c25 commit 692491d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Trace Wizard/UI/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Trace Wizard/UI/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,24 @@ private void toolStripStatusLabel1_Click(object sender, EventArgs e)
{

}

private void executionTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
var selectedItem = e.Node.Tag as ExecutionCall;
if (selectedItem != null && (selectedItem.Type == ExecutionCallType.SQL || selectedItem.Type == ExecutionCallType.AE_SQL))
{
mainTabStrip.SelectedTab = sqlStatementsTab;
IEnumerable<ListViewItem> lv = sqlListView.Items.Cast<ListViewItem>();
var viewItem = lv.Where(i => i.Tag != null && i.Tag == selectedItem.SQLStatement).FirstOrDefault();
if (viewItem != null)
{
viewItem.Selected = true;
sqlListView.Select();
sqlListView.EnsureVisible(sqlListView.Items.IndexOf(viewItem));
}
}

}
}

enum SQLDisplayType
Expand Down

0 comments on commit 692491d

Please sign in to comment.