diff --git a/SourceGen/AppForms/ProjectView.Designer.cs b/SourceGen/AppForms/ProjectView.Designer.cs index 4416b4c..bfa9275 100644 --- a/SourceGen/AppForms/ProjectView.Designer.cs +++ b/SourceGen/AppForms/ProjectView.Designer.cs @@ -1222,8 +1222,8 @@ namespace SourceGen.AppForms this.codeListView.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.codeListView_RetrieveVirtualItem); this.codeListView.SelectedIndexChanged += new System.EventHandler(this.codeListView_SelectedIndexChanged); this.codeListView.VirtualItemsSelectionRangeChanged += new System.Windows.Forms.ListViewVirtualItemsSelectionRangeChangedEventHandler(this.codeListView_VirtualItemsSelectionRangeChanged); - this.codeListView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.codeListView_MouseClick); this.codeListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.codeListView_MouseDoubleClick); + this.codeListView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.codeListView_MouseDown); // // columnOffset // diff --git a/SourceGen/AppForms/ProjectView.cs b/SourceGen/AppForms/ProjectView.cs index 864e340..4fb3934 100644 --- a/SourceGen/AppForms/ProjectView.cs +++ b/SourceGen/AppForms/ProjectView.cs @@ -1963,15 +1963,12 @@ namespace SourceGen.AppForms { dlg.Dispose(); } - private void codeListView_MouseClick(object sender, MouseEventArgs e) { - //if (e.Button == MouseButtons.Left) { - // Debug.WriteLine("LEFT CLICK"); - //} else if (e.Button == MouseButtons.Right) { - // Debug.WriteLine("RIGHT CLICK"); - // //ShowRightClickMenu(); - //} else { - // Debug.WriteLine("CLICK " + e.Button); - //} + private void codeListView_MouseDown(object sender, MouseEventArgs e) { + // MouseClick only fires for certain buttons and certain locations. MouseDown + // fires for all buttons so long as the pointer is in the codeListView area. + if (e.Button == MouseButtons.XButton1 && navigateBackToolStripButton.Enabled) { + navigateBackToolStripButton_Click(sender, e); + } } private void codeListView_MouseDoubleClick(object sender, MouseEventArgs e) {