Explorar o código

:bug: Exporting PDF hangs after focusing heading block Fix https://github.com/siyuan-note/siyuan/issues/7848

Liang Ding %!s(int64=2) %!d(string=hai) anos
pai
achega
b7e1dc4a36
Modificáronse 2 ficheiros con 3 adicións e 1 borrados
  1. 2 0
      kernel/model/export.go
  2. 1 1
      kernel/model/export_merge.go

+ 2 - 0
kernel/model/export.go

@@ -628,7 +628,9 @@ func prepareExportTree(bt *treenode.BlockTree) (ret *parse.Tree) {
 			first.InsertBefore(node)
 		}
 	}
+	ret.Path = bt.Path
 	ret.HPath = bt.HPath
+	ret.Box = bt.BoxID
 	return
 }
 

+ 1 - 1
kernel/model/export_merge.go

@@ -25,7 +25,7 @@ import (
 
 func mergeSubDocs(rootTree *parse.Tree) (ret *parse.Tree, err error) {
 	ret = rootTree
-	rootBlock := &Block{Box: rootTree.Box, ID: rootTree.ID, Path: rootTree.Path}
+	rootBlock := &Block{Box: rootTree.Box, ID: rootTree.ID, Path: rootTree.Path, HPath: rootTree.HPath}
 	if err = buildBlockChildren(rootBlock); nil != err {
 		return
 	}