From eb4b3a1f82288df4eef4e17ad5e132396e620f99 Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 15 Apr 2021 21:04:29 -0500 Subject: [PATCH] Tastudio - open edit marker pop up when double clicking a marker --- .../tools/TAStudio/MarkerControl.Designer.cs | 9 ++++----- .../tools/TAStudio/MarkerControl.cs | 10 ++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs index 3ea8161d43..a89487fff1 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs @@ -159,24 +159,22 @@ // // MarkerView // - this.MarkerView.CellWidthPadding = 3; - this.MarkerView.GridLines = true; this.MarkerView.AllowColumnReorder = false; this.MarkerView.AllowColumnResize = false; + this.MarkerView.AllowMassNavigationShortcuts = true; + this.MarkerView.AllowRightClickSelection = true; this.MarkerView.AlwaysScroll = false; this.MarkerView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.MarkerView.CellHeightPadding = 0; + this.MarkerView.ChangeSelectionWhenPaging = true; this.MarkerView.ContextMenuStrip = this.MarkerContextMenu; this.MarkerView.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MarkerView.FullRowSelect = true; - this.MarkerView.HideWasLagFrames = false; this.MarkerView.HorizontalOrientation = false; - this.MarkerView.LagFramesToHide = 0; this.MarkerView.LetKeysModifySelection = false; this.MarkerView.Location = new System.Drawing.Point(6, 19); - this.MarkerView.MultiSelect = true; this.MarkerView.Name = "MarkerView"; this.MarkerView.RowCount = 0; this.MarkerView.ScrollSpeed = 1; @@ -185,6 +183,7 @@ this.MarkerView.TabIndex = 0; this.MarkerView.TabStop = false; this.MarkerView.SelectedIndexChanged += new System.EventHandler(this.MarkerView_SelectedIndexChanged); + this.MarkerView.DoubleClick += new System.EventHandler(this.MarkerView_DoubleClick); this.MarkerView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.MarkerView_MouseDoubleClick); // // MarkersGroupBox diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs index 8655ffd1a3..47f917b53e 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs @@ -315,5 +315,15 @@ namespace BizHawk.Client.EmuHawk return -1; } + + private void MarkerView_DoubleClick(object sender, EventArgs e) + { + if (MarkerView.AnyRowsSelected) + { + var index = MarkerView.SelectedRows.First(); + var marker = Markers[index]; + EditMarkerPopUp(marker); + } + } } }