mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-04 20:20:12 +08:00
🐛 Improve outline dnd https://github.com/siyuan-note/siyuan/issues/10828
This commit is contained in:
parent
844fa8ef64
commit
e12ed21c65
@ -31,17 +31,16 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
|
||||
previousID := operation.PreviousID
|
||||
parentID := operation.ParentID
|
||||
|
||||
if headingID == parentID || headingID == previousID {
|
||||
return
|
||||
}
|
||||
|
||||
tree, err := tx.loadTree(headingID)
|
||||
if nil != err {
|
||||
return &TxErr{code: TxErrCodeBlockNotFound, id: headingID}
|
||||
}
|
||||
|
||||
operation.RetData = tree.Root.ID
|
||||
|
||||
if headingID == parentID || headingID == previousID {
|
||||
return
|
||||
}
|
||||
|
||||
heading := treenode.GetNodeInTree(tree, headingID)
|
||||
if nil == heading {
|
||||
return &TxErr{code: TxErrCodeBlockNotFound, id: headingID}
|
||||
|
Loading…
Reference in New Issue
Block a user