添加todo任务.

pull/7/head
ChenX 7 years ago
parent d664a689a5
commit 1bdd05c9d8

@ -3,6 +3,8 @@ import { CADFile } from './CADFile';
import { CADObject } from './CADObject';
import { CommandHistoryRecord } from './CommandHistoryRecord';
//TODO:对于空的新建命令,应该支持不清空后续命令. 比如切换相机或者切换视图.
//历史记录管理
@Factory
export class HistoricManage extends CADObject
@ -89,16 +91,13 @@ export class HistoricManage extends CADObject
this.EndCmd();
let historyRec = this.historyRecord[this.curIndex];
if (!historyRec)
{
return false;
}
this.doing = true;
for (let [id, recList] of historyRec.HistoryList)
{
let obj = id.Object;
for (let i = recList.length; i--;)
{
obj.ApplyPartialUndo(recList[i].undoData);
id.Object.ApplyPartialUndo(recList[i].undoData);
}
}
this.curIndex--;
@ -109,16 +108,13 @@ export class HistoricManage extends CADObject
{
let historyRec = this.historyRecord[this.curIndex + 1];
if (!historyRec)
{
return false;
}
this.doing = true;
for (let [id, recList] of historyRec.HistoryList)
{
let obj = id.Object;
for (let rec of recList)
{
obj.ApplyPartialUndo(rec.redoData);
id.Object.ApplyPartialUndo(rec.redoData);
}
}
this.curIndex++;

Loading…
Cancel
Save