TasStateManager - more work arounds to deal with the scenario of removing branches, I doubt this is the correct approach, but I don't know what else to do, someone should revisit this

This commit is contained in:
adelikat 2015-09-06 13:39:14 -04:00
parent f06e2d86da
commit 0a4ad42eaa
1 changed files with 6 additions and 1 deletions
BizHawk.Client.Common/movie/tasproj

View File

@ -768,7 +768,12 @@ namespace BizHawk.Client.Common
stateList = new SortedList<int, tsmState>();
BranchStates[kvp.Key] = stateList;
}
stateList.Add(branches, kvp.Value);
// adelikat: More key checking, needed for these steps: new project, add frames, branch, add frames, branch, add frames, branch, remove first branch, add frames, branch
if (!stateList.ContainsKey(branches))
{
stateList.Add(branches, kvp.Value);
}
}
branches++;
currentBranch = branches;