mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-29 19:56:10 +01:00
🎨 Generate document history when dragging outline https://github.com/siyuan-note/siyuan/issues/10834
This commit is contained in:
parent
0c4ebbeea0
commit
ac9304f589
10 changed files with 40 additions and 38 deletions
|
|
@ -83,7 +83,7 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
|
|||
}
|
||||
}
|
||||
|
||||
generateFormatHistory(tree)
|
||||
generateOpTypeHistory(tree, HistoryOpOutline)
|
||||
|
||||
targetNode := previousHeading
|
||||
previousHeadingChildren := treenode.HeadingChildren(previousHeading)
|
||||
|
|
@ -130,7 +130,7 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
|
|||
}
|
||||
}
|
||||
|
||||
generateFormatHistory(tree)
|
||||
generateOpTypeHistory(tree, HistoryOpOutline)
|
||||
|
||||
targetNode := parentHeading
|
||||
parentHeadingChildren := treenode.HeadingChildren(parentHeading)
|
||||
|
|
@ -172,7 +172,7 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
|
|||
}
|
||||
targetNode.InsertAfter(heading)
|
||||
} else {
|
||||
generateFormatHistory(tree)
|
||||
generateOpTypeHistory(tree, HistoryOpOutline)
|
||||
|
||||
// 移到最前
|
||||
for i := len(headingChildren) - 1; i >= 0; i-- {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue