Tastudio - open edit marker pop up when double clicking a marker

This commit is contained in:
adelikat 2021-04-15 21:04:29 -05:00
parent a95c4f1820
commit eb4b3a1f82
2 changed files with 14 additions and 5 deletions

View File

@ -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

View File

@ -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);
}
}
}
}