From 140ce0af1613a5f57128af7673593a2cb32875cc Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 18 Jul 2015 12:33:03 -0400 Subject: [PATCH] TASTudio - when showing the marker naming pop up, clear out all the states that would have been done by the mouse up event that hasn't happened yet, prevents being able to highlight frames while the pop up is open --- .../tools/TAStudio/TAStudio.ListView.cs | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index 3f0a3bf05f..cfdbf00e4a 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -469,6 +469,26 @@ namespace BizHawk.Client.EmuHawk } } + private void ClearLeftMouseStates() + { + _startCursorDrag = false; + _startFrameDrag = false; + _startBoolDrawColumn = string.Empty; + _startFloatDrawColumn = string.Empty; + // Exit float editing if value was changed with cursor + if (_floatEditRow != -1 && _floatPaintState != CurrentTasMovie.GetFloatState(_floatEditRow, _floatEditColumn)) + { + _floatEditRow = -1; + RefreshDialog(); + } + _floatPaintState = 0; + _floatEditYPos = -1; + _leftButtonHeld = false; + + if (_floatEditRow == -1) + CurrentTasMovie.ChangeLog.EndBatch(); + } + private void TasView_MouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right && !TasView.IsPointingAtColumnHeader && !_supressContextMenu) @@ -477,22 +497,7 @@ namespace BizHawk.Client.EmuHawk } else if (e.Button == MouseButtons.Left) { - _startCursorDrag = false; - _startFrameDrag = false; - _startBoolDrawColumn = string.Empty; - _startFloatDrawColumn = string.Empty; - // Exit float editing if value was changed with cursor - if (_floatEditRow != -1 && _floatPaintState != CurrentTasMovie.GetFloatState(_floatEditRow, _floatEditColumn)) - { - _floatEditRow = -1; - RefreshDialog(); - } - _floatPaintState = 0; - _floatEditYPos = -1; - _leftButtonHeld = false; - - if (_floatEditRow == -1) - CurrentTasMovie.ChangeLog.EndBatch(); + ClearLeftMouseStates(); } if (e.Button == System.Windows.Forms.MouseButtons.Right) @@ -556,6 +561,7 @@ namespace BizHawk.Client.EmuHawk } else { + ClearLeftMouseStates(); CallAddMarkerPopUp(TasView.CurrentCell.RowIndex.Value); } }