Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-04 11:33:24 +08:00
parent bada8daa01
commit cb79c4aed6
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -978,12 +978,6 @@ func DuplicateDoc(tree *parse.Tree) {
previousPath := tree.Path previousPath := tree.Path
resetTree(tree, "Duplicated", false) resetTree(tree, "Duplicated", false)
createTreeTx(tree)
box := Conf.Box(tree.Box)
if nil != box {
box.addSort(previousPath, tree.ID)
}
FlushTxQueue()
// 复制为副本时移除数据库绑定状态 https://github.com/siyuan-note/siyuan/issues/12294 // 复制为副本时移除数据库绑定状态 https://github.com/siyuan-note/siyuan/issues/12294
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus { ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
@ -996,6 +990,13 @@ func DuplicateDoc(tree *parse.Tree) {
n.RemoveIALAttrsByPrefix(av.NodeAttrViewStaticText) n.RemoveIALAttrsByPrefix(av.NodeAttrViewStaticText)
return ast.WalkContinue return ast.WalkContinue
}) })
createTreeTx(tree)
box := Conf.Box(tree.Box)
if nil != box {
box.addSort(previousPath, tree.ID)
}
FlushTxQueue()
return return
} }