mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
0ff82ebe3e
commit
7d8e0ef1fd
1 changed files with 10 additions and 0 deletions
|
|
@ -1276,6 +1276,16 @@ func (tx *Transaction) doInsert(operation *Operation) (ret *TxErr) {
|
|||
node.InsertAfter(remain)
|
||||
}
|
||||
node.InsertAfter(insertedNode)
|
||||
|
||||
keepFold := false
|
||||
if nil != operation.Context && nil != operation.Context["keepFold"] {
|
||||
keepFoldArg := operation.Context["keepFold"]
|
||||
keepFold = keepFoldArg.(bool)
|
||||
}
|
||||
if !keepFold {
|
||||
parentFoldedHeading := treenode.GetParentFoldedHeading(insertedNode)
|
||||
unfoldHeading(parentFoldedHeading)
|
||||
}
|
||||
} else {
|
||||
node = treenode.GetNodeInTree(tree, operation.ParentID)
|
||||
if nil == node {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue