mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
f2afd11a84
2 changed files with 19 additions and 13 deletions
|
@ -3480,8 +3480,6 @@ func sortAttributeViewRow(operation *Operation) (err error) {
|
|||
}
|
||||
targetGroupView.GroupItemIDs = util.InsertElem(targetGroupView.GroupItemIDs, previousIndex, itemID)
|
||||
}
|
||||
|
||||
regenAttrViewGroups(attrView, "force")
|
||||
} else { // 同分组内排序
|
||||
for i, r := range groupView.GroupItemIDs {
|
||||
if r == operation.PreviousID {
|
||||
|
@ -4310,20 +4308,24 @@ func updateAttributeViewValue(tx *Transaction, attrView *av.AttributeView, keyID
|
|||
|
||||
// val.IsDetached 只有更新主键的时候才会传入,所以下面需要结合 isUpdatingBlockKey 来判断
|
||||
|
||||
if isUpdatingBlockKey {
|
||||
if oldIsDetached {
|
||||
// 之前是游离行
|
||||
|
||||
if !val.IsDetached { // 现在绑定了块
|
||||
// 将游离行绑定到新建的块上
|
||||
bindBlockAv(tx, avID, blockID)
|
||||
if nil != val.Block {
|
||||
val.BlockID = val.Block.ID
|
||||
|
||||
if val.Block.ID != blockID {
|
||||
// 从其他库拷贝主键值后会出现该情况
|
||||
blockID = val.Block.ID
|
||||
val.BlockID = blockID
|
||||
}
|
||||
|
||||
bindBlockAv(tx, avID, blockID)
|
||||
}
|
||||
} else {
|
||||
// 之前绑定了块
|
||||
|
||||
if isUpdatingBlockKey { // 正在更新主键
|
||||
if val.IsDetached { // 现在是游离行
|
||||
// 将绑定的块从属性视图中移除
|
||||
unbindBlockAv(tx, avID, blockID)
|
||||
|
|
|
@ -3390,6 +3390,10 @@ func exportRefTrees(tree *parse.Tree, defBlockIDs *[]string, retTrees, treeCache
|
|||
}
|
||||
|
||||
for _, val := range blockKeyValues.Values {
|
||||
if val.IsDetached {
|
||||
continue
|
||||
}
|
||||
|
||||
defBlock := treenode.GetBlockTree(val.BlockID)
|
||||
if nil == defBlock {
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue