Skip to content

Commit 5a405ec

Browse files
committed
editor: Clear oop node before saving
This ensures that it won't save multiple oop nodes into the meta.xml
1 parent 199329f commit 5a405ec

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

[editor]/editor_main/server/resourcehooks.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ function clearResourceMeta ( resource, quick ) --removes settings and info nodes
5454
break
5555
end
5656
end
57+
--Destroy leftover OOP nodes
58+
while true do
59+
local oopNode = xmlFindChild(metaNode, 'oop', 0)
60+
if oopNode then
61+
xmlDestroyNode(oopNode)
62+
else
63+
break
64+
end
65+
end
5766
--Destroy any other nodes
5867
local nodes = xmlNodeGetChildren ( metaNode )
5968
for key, node in ipairs(nodes) do

0 commit comments

Comments
 (0)