mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
feat(编辑渲染): 修复资源引用,完善注解读取
This commit is contained in:
1 parent
a5f51294eb
commit
52fc88f2b8
14 files changed
+198
-114
No files matched your search
+3
-1
@@ -512,6 +512,8 @@ func (e *Editor) usedResources() (fonts, images []editorResource, spaces []Color
|
||||
}
|
||||
}
|
||||
}
|
||||
normalizeResourceReferences(used)
|
||||
normalizeResourceReferences(promoted)
|
||||
for i := len(e.resources) - 1; i >= 0; i-- {
|
||||
resource := e.resources[i]
|
||||
if resource.definition() != "" && used[resource.definition()] {
|
||||
@@ -541,7 +543,7 @@ func (e *Editor) usedResources() (fonts, images []editorResource, spaces []Color
|
||||
}
|
||||
}
|
||||
for id := range promoted {
|
||||
if name := e.source.reader.resourceFiles[id]; name != "" {
|
||||
if name, _ := resourceValue(e.source.reader.resourceFiles, id); name != "" {
|
||||
files[name] = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user