mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 04:10:16 +01:00
🎨 Improve rollback doc to avoid ID duplication https://github.com/siyuan-note/siyuan/issues/14358
This commit is contained in:
parent
d348ad0383
commit
6407791fbb
3 changed files with 25 additions and 16 deletions
|
|
@ -204,8 +204,7 @@ func resetDuplicateBlocksOnFileSys() {
|
|||
|
||||
if "" == n.ID {
|
||||
needOverwrite = true
|
||||
n.ID = ast.NewNodeID()
|
||||
n.SetIALAttr("id", n.ID)
|
||||
treenode.ResetNodeID(n)
|
||||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
|
|
@ -225,8 +224,7 @@ func resetDuplicateBlocksOnFileSys() {
|
|||
|
||||
// 其他情况,重置节点 ID
|
||||
needOverwrite = true
|
||||
n.ID = ast.NewNodeID()
|
||||
n.SetIALAttr("id", n.ID)
|
||||
treenode.ResetNodeID(n)
|
||||
needRefreshUI = true
|
||||
return ast.WalkContinue
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue