Work around mono crashing on Rows.Clear()
Mono will crash if you do a Rows.Clear() and the first row isnt visible. To work around this, when running under mono force scroll to [0,0] cell before issuing the Clear(). https://bugzilla.xamarin.com/show_bug.cgi?id=24372 Renamed Settings.MonoFileIO to Settings.IsUnix Created Settings.IsMono
This commit is contained in:
@@ -444,6 +444,15 @@ namespace ROMVault2
|
||||
private void DatSetSelected(RvBase cf)
|
||||
{
|
||||
DirTree.Refresh();
|
||||
|
||||
if (Settings.IsMono)
|
||||
{
|
||||
if (GameGrid.RowCount > 0)
|
||||
GameGrid.CurrentCell = GameGrid[0,0];
|
||||
if (RomGrid.RowCount > 0)
|
||||
RomGrid.CurrentCell = RomGrid[0,0];
|
||||
}
|
||||
|
||||
GameGrid.Rows.Clear();
|
||||
RomGrid.Rows.Clear();
|
||||
|
||||
@@ -579,6 +588,15 @@ namespace ROMVault2
|
||||
lblDITRomsUnknown.Text = (tDir.DirStatus.CountUnknown() + tDir.DirStatus.CountInToSort()).ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
_updatingGameGrid = true;
|
||||
|
||||
if (Settings.IsMono)
|
||||
{
|
||||
if (GameGrid.RowCount > 0)
|
||||
GameGrid.CurrentCell = GameGrid[0,0];
|
||||
if (RomGrid.RowCount > 0)
|
||||
RomGrid.CurrentCell = RomGrid[0,0];
|
||||
}
|
||||
|
||||
GameGrid.Rows.Clear();
|
||||
RomGrid.Rows.Clear();
|
||||
|
||||
@@ -1160,6 +1178,9 @@ namespace ROMVault2
|
||||
}
|
||||
}
|
||||
|
||||
if (Settings.IsMono && RomGrid.RowCount > 0)
|
||||
RomGrid.CurrentCell = RomGrid[0,0];
|
||||
|
||||
RomGrid.Rows.Clear();
|
||||
AddDir(tGame, "");
|
||||
GC.Collect();
|
||||
|
||||
Reference in New Issue
Block a user