Fix modifier key check in `TAStudio.TasView_MouseDown`

This commit is contained in:
YoshiRulz 2022-08-24 09:29:24 +10:00
parent 61c34eca74
commit a344ee2288
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 8 additions and 4 deletions

View File

@ -626,15 +626,17 @@ namespace BizHawk.Client.EmuHawk
_patternPaint = false;
_startBoolDrawColumn = buttonName;
if ((ModifierKeys == Keys.Alt && ModifierKeys != Keys.Shift) || (applyPatternToPaintedInputToolStripMenuItem.Checked && (!onlyOnAutoFireColumnsToolStripMenuItem.Checked
|| TasView.CurrentCell.Column.Emphasis)))
var altOrShift4State = ModifierKeys & (Keys.Alt | Keys.Shift);
if (altOrShift4State is Keys.Alt
|| (applyPatternToPaintedInputToolStripMenuItem.Checked
&& (!onlyOnAutoFireColumnsToolStripMenuItem.Checked || TasView.CurrentCell.Column.Emphasis)))
{
BoolPatterns[ControllerType.BoolButtons.IndexOf(buttonName)].Reset();
_patternPaint = true;
_startRow = TasView.CurrentCell.RowIndex.Value;
_boolPaintState = !CurrentTasMovie.BoolIsPressed(frame, buttonName);
}
else if (ModifierKeys == Keys.Shift && ModifierKeys != Keys.Alt)
else if (altOrShift4State is Keys.Shift)
{
if (!TasView.AnyRowsSelected) return;
@ -658,10 +660,12 @@ namespace BizHawk.Client.EmuHawk
_triggerAutoRestore = true;
RefreshDialog();
}
else if (ModifierKeys == Keys.Shift && ModifierKeys == Keys.Alt) // Does not work?
#if false // to match previous behaviour
else if (altOrShift4State is not 0)
{
// TODO: Pattern drawing from selection to current cell
}
#endif
else
{
CurrentTasMovie.ChangeLog.BeginNewBatch($"Paint Bool {buttonName} from frame {frame}");