Skip to content

Commit

Permalink
Merge pull request #1306 from Postremus/#1298_fix_TMP
Browse files Browse the repository at this point in the history
Fixed checkbox not toggling when chossing a providing mod
  • Loading branch information
pjf committed Jul 16, 2015
2 parents 394ed6b + 4fa7ffc commit af3b8f0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion GUI/GUIMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,15 @@ public void SetInstallChecked(DataGridViewRow row, bool? set_value_to = null)
{
//Contract.Requires<ArgumentException>(row.Cells[0] is DataGridViewCheckBoxCell);
var install_cell = row.Cells[0] as DataGridViewCheckBoxCell;
IsInstallChecked = (bool) install_cell.Value;
bool changeTo = set_value_to != null ? (bool)set_value_to : (bool)install_cell.Value;
//Need to do this check here to prevent an infite loop
//which is at least happening on Linux
//TODO: Elimate the cause
if (changeTo != IsInstallChecked)
{
IsInstallChecked = changeTo;
install_cell.Value = IsInstallChecked;
}
}


Expand Down

0 comments on commit af3b8f0

Please sign in to comment.