undo & redo

This commit is contained in:
zhandouxiaojiji committed 2020-12-01 21:15:08 +08:00
1 parent 8c6991afb3
commit d87cba3622
6 files changed
+76 -10

No files matched your search

+10
View File
@@ -62,6 +62,16 @@ export default class TreeTabs extends Component<TreeTabsProps, TreeTabsState> {
}
message.success("已保存所有行为树");
});
ipcRenderer.on(MainEventType.UNDO, () => {
const editor = this.getCurEditor();
editor?.undo();
});
ipcRenderer.on(MainEventType.REDO, () => {
const editor = this.getCurEditor();
editor?.redo();
});
}
getOpenTreesModel() {