From 4297fb63bbe8834733a054129f97e30c2b7f849f Mon Sep 17 00:00:00 2001 From: zhandouxiaojiji Date: Sat, 25 Nov 2023 15:51:17 +0800 Subject: [PATCH] fix paste --- render-process/Editor/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/render-process/Editor/index.tsx b/render-process/Editor/index.tsx index 847117b..3fb993b 100644 --- a/render-process/Editor/index.tsx +++ b/render-process/Editor/index.tsx @@ -428,19 +428,19 @@ export default class Editor extends React.Component { if (!str || str == "") { return; } - this.pushUndoStack(); const data = Utils.createTreeData(JSON.parse(str), this.settings); this.autoId = Utils.refreshNodeId(data, this.autoId); this.onSelectNode(null); if (!curNodeData.children) { curNodeData.children = []; } + this.pushUndoStack(); curNodeData.children.push(data); // this.autoId = Utils.refreshNodeId(this.graph.findDataById("1") as GraphNodeModel); this.changeWithoutAnim(); } catch (error) { // message.error("粘贴数据有误"); - console.log("paste error"); + console.log(error); } }