Merge pull request #1194 from ispyisail/fix/element-nonfinite-coordinates

Fix bugtracker #266: symbol with a nan coordinate breaks the editor
This commit is contained in:
Laurent Trinques
2026-10-01 07:12:27 +02:00
committed by GitHub
4 changed files with 50 additions and 0 deletions
+8
View File
@@ -1272,6 +1272,14 @@ ElementContent ElementScene::loadContent(const QDomDocument &xml_document)
CustomElementPart *cep = nullptr;
PartDynamicTextField *pdtf = nullptr;
//A shape with a "nan" or "inf" coordinate is not drawn
//on the folio either; loading it would only break the view
if (QET::hasNonFiniteGeometry(qde)) {
qWarning() << "Element editor: skipped a" << qde.tagName()
<< "with a non-finite coordinate";
continue;
}
if (qde.tagName() == "line") cep = new PartLine (m_element_editor);
else if (qde.tagName() == "rect") cep = new PartRectangle (m_element_editor);
else if (qde.tagName() == "ellipse") cep = new PartEllipse (m_element_editor);