示例#1
0
        public void LoadBranch(TasBranch branch)
        {
            int?divergentPoint = DivergentPoint(_log, branch.InputLog);

            if (_log != null)
            {
                _log.Dispose();
            }
            _log = branch.InputLog.Clone();
            //_changes = true;

            // if there are branch states, they will be loaded anyway
            // but if there's none, or only *after* divergent point, don't invalidate the entire movie anymore
            if (divergentPoint.HasValue)
            {
                StateManager.Invalidate(divergentPoint.Value);
                LagLog.FromLagLog(branch.LagLog);                 // don't truncate LagLog if the branch's one is shorter, but input is the same
            }
            else
            {
                StateManager.Invalidate(branch.InputLog.Count);
            }

            StateManager.LoadBranch(Branches.IndexOf(branch));

            StateManager.SetState(branch.Frame, branch.CoreData);

            //ChangeLog = branch.ChangeLog;
            Markers = branch.Markers;
            Changes = true;
        }
示例#2
0
        public void LoadBranch(TasBranch branch)
        {
            int?divergentPoint = DivergentPoint(Log, branch.InputLog);

            Log?.Dispose();
            Log = branch.InputLog.Clone();
            ////_changes = true;

            // if there are branch states, they will be loaded anyway
            // but if there's none, or only *after* divergent point, don't invalidate the entire movie anymore
            if (divergentPoint.HasValue)
            {
                _stateManager.Invalidate(divergentPoint.Value);
                _lagLog.FromLagLog(branch.LagLog);                 // don't truncate LagLog if the branch's one is shorter, but input is the same
            }
            else
            {
                _stateManager.Invalidate(branch.InputLog.Count);
            }

            _stateManager.LoadBranch(Branches.IndexOf(branch));
            _stateManager.SetState(branch.Frame, branch.CoreData);

            ////ChangeLog = branch.ChangeLog;
            if (BindMarkersToInput)             // pretty critical not to erase them
            {
                Markers = branch.Markers;
            }

            Changes = true;
        }
示例#3
0
        public void LoadBranch(TasBranch branch)
        {
            int?divergentPoint = DivergentPoint(Log, branch.InputLog);

            Log?.Dispose();
            Log = branch.InputLog.Clone();

            _lagLog.FromLagLog(branch.LagLog);

            // if there are branch states, they will be loaded anyway
            // but if there's none, or only *after* divergent point, don't invalidate the entire movie anymore
            if (divergentPoint.HasValue)
            {
                _stateManager.Invalidate(divergentPoint.Value);
            }
            else
            {
                _stateManager.Invalidate(branch.InputLog.Count);
            }

            if (BindMarkersToInput)             // pretty critical not to erase them
            {
                Markers = branch.Markers;
            }

            Changes = true;
        }
示例#4
0
        public void LoadBranch(TasBranch branch)
        {
            int?divergentPoint = DivergantPoint(_log, branch.InputLog);

            _log     = branch.InputLog.ToList();
            _changes = true;
            LagLog.FromLagLog(branch.LagLog);

            StateManager.LoadBranch(Branches.IndexOf(branch));

            StateManager.SetState(branch.Frame, branch.CoreData);

            ChangeLog = branch.ChangeLog;
            Markers   = branch.Markers;
        }