From 45d7f14b4db13670ffdaa01e5d3e0f0d26baa61e Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sat, 10 Dec 2016 21:10:15 -0800 Subject: [PATCH] Inject into the process upon a double-click A canonical UI paradigm is that when you have a dialog with a list of items as a central element and an "Ok" action, double-clicking the item results in the dialog confirmation. This change adds this behavior to the Capture dialog. --- renderdocui/Windows/Dialogs/CaptureDialog.Designer.cs | 1 + renderdocui/Windows/Dialogs/CaptureDialog.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/renderdocui/Windows/Dialogs/CaptureDialog.Designer.cs b/renderdocui/Windows/Dialogs/CaptureDialog.Designer.cs index 84950a7f6..a7ff8796b 100644 --- a/renderdocui/Windows/Dialogs/CaptureDialog.Designer.cs +++ b/renderdocui/Windows/Dialogs/CaptureDialog.Designer.cs @@ -647,6 +647,7 @@ this.pidList.UseCompatibleStateImageBehavior = false; this.pidList.View = System.Windows.Forms.View.Details; this.pidList.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.pidList_ColumnClick); + this.pidList.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.pidList_MouseDoubleClick); this.pidList.Resize += new System.EventHandler(this.pidList_Resize); // // winTitle diff --git a/renderdocui/Windows/Dialogs/CaptureDialog.cs b/renderdocui/Windows/Dialogs/CaptureDialog.cs index 95530f212..965da3b77 100644 --- a/renderdocui/Windows/Dialogs/CaptureDialog.cs +++ b/renderdocui/Windows/Dialogs/CaptureDialog.cs @@ -1245,5 +1245,10 @@ namespace renderdocui.Windows.Dialogs mainTableLayout.MinimumSize = new Size(0, mainTableLayout.ClientRectangle.Height - margin); } } + + private void pidList_MouseDoubleClick(object sender, MouseEventArgs e) + { + TriggerCapture(); + } } }