Skip to content

Commit

Permalink
Removed keydown handler, was too buggy.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaJordan committed Feb 2, 2024
1 parent d379790 commit affbd94
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions Forms/ItemDistributionForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,30 +149,6 @@ private void RefreshDistributionDisplay()
dataGridView1.DataSource = dataTable;
}

private void DataGridView1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Space)
{
e.Handled = true;
var i = 0;
foreach (var cell in dataGridView1.SelectedCells)
{
if (cell is DataGridViewCheckBoxCell checkBoxCell)
{
if (checkBoxCell.Value is bool isChecked)
{
checkBoxCell.Value = !isChecked;
}
else
{
// This cell is null for some reason.
checkBoxCell.Value = true;
}
}
}
}
}

private void DataError(object sender, DataGridViewDataErrorEventArgs e)
{
MainForm.ShowDataError();
Expand Down

0 comments on commit affbd94

Please sign in to comment.