From 8edbc8bfe17022de5cbecc65790ae3ef8a9e39a1 Mon Sep 17 00:00:00 2001 From: kylelyk Date: Sun, 31 Aug 2014 18:06:31 +0000 Subject: [PATCH] TAStudio: Fixed double middle/right click creating new marker. Fixed selected row not displaying properly. --- .../tools/TAStudio/InputRoll.cs | 17 +++++++++++++++-- .../tools/TAStudio/TAStudio.ListView.cs | 3 ++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs index 2250757da6..057683ec6f 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs @@ -791,10 +791,21 @@ namespace BizHawk.Client.EmuHawk { foreach(var cell in SelectedItems) { - DrawCellBG(SystemColors.Highlight, cell); + var relativeCell = new Cell() + { + RowIndex = cell.RowIndex - FirstVisibleRow, + Column = cell.Column, + CurrentText = cell.CurrentText + }; + DrawCellBG(SystemColors.Highlight, relativeCell); } } + /// + /// Given a cell with rowindex inbetween 0 and VisibleRows, it draws the background color specified. Do not call with absolute rowindices. + /// + /// + /// private void DrawCellBG(Color color, Cell cell) { int x = 0, @@ -818,6 +829,8 @@ namespace BizHawk.Client.EmuHawk h = CellHeight - 1; } + if (x > DrawWidth || y > DrawHeight) { return; }//Don't d + Gdi.SetBrush(color); Gdi.FillRectangle(x, y, w, h); } @@ -896,7 +909,7 @@ namespace BizHawk.Client.EmuHawk protected override void OnKeyDown(KeyEventArgs e) { - if (e.Control && !e.Alt && !e.Shift && e.KeyCode == Keys.R) // Ctrl + R + if (e.Control && !e.Alt && e.Shift && e.KeyCode == Keys.R) // Ctrl + Shift + R { HorizontalOrientation ^= true; Refresh(); diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index 390530b9f5..eeb42aa550 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -277,7 +277,8 @@ namespace BizHawk.Client.EmuHawk { if (TasView.CurrentCell.RowIndex.HasValue && TasView.CurrentCell != null && - TasView.CurrentCell.Column.Name == FrameColumnName) + TasView.CurrentCell.Column.Name == FrameColumnName && + e.Button == MouseButtons.Left) { CallAddMarkerPopUp(TasView.CurrentCell.RowIndex.Value); }