Skip to content

Commit ed5a24c

Browse files
[Sofa.Common] Fix SceneLoaderXML invalid root filename & lineno (#5729)
The XML loader does not properly set the location of the root node, so using the Go To Scene... in the UX does not work. The PR fix it.
1 parent 83a8732 commit ed5a24c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sofa/framework/Simulation/Common/src/sofa/simulation/common/SceneLoaderXML.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ Node::SPtr SceneLoaderXML::processXML(xml::BaseElement* xml, const char *filenam
138138
}
139139

140140
Node::SPtr root = down_cast<Node> ( baseroot );
141+
root->setInstanciationSourceFileName(xml->getSrcFile());
142+
root->setInstanciationSourceFilePos(xml->getSrcLine());
141143

142144
return root;
143145
}

0 commit comments

Comments
 (0)