InputRoll - simplify

This commit is contained in:
adelikat 2019-12-03 20:05:32 -06:00
parent eb63fa5a92
commit 1a6c1e7ebe
2 changed files with 2 additions and 4 deletions

View File

@ -19,8 +19,6 @@ namespace BizHawk.Client.EmuHawk
RowIndex = cell.RowIndex;
}
public bool IsDataCell => Column != null && RowIndex.HasValue;
public override bool Equals(object obj)
{
var cell = obj as Cell;

View File

@ -572,7 +572,7 @@ namespace BizHawk.Client.EmuHawk
if (e.Button == MouseButtons.Left)
{
if (BranchView.CurrentCell != null && BranchView.CurrentCell.IsDataCell
if (BranchView.CurrentCell.IsDataCell()
&& BranchView.CurrentCell.Column.Name == BranchNumberColumnName)
{
BranchView.DragCurrentCell();
@ -615,7 +615,7 @@ namespace BizHawk.Client.EmuHawk
private void BranchView_CellDropped(object sender, InputRoll.CellEventArgs e)
{
if (e.NewCell != null && e.NewCell.IsDataCell && e.OldCell.RowIndex < Movie.Branches.Count)
if (e.NewCell.IsDataCell() && e.OldCell.RowIndex < Movie.Branches.Count)
{
var guid = Movie.BranchGuidByIndex(Movie.CurrentBranch);
Movie.SwapBranches(e.OldCell.RowIndex.Value, e.NewCell.RowIndex.Value);