mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-04-04 02:59:59 +02:00
Conditionally save max_slaves if limit is set
This commit is contained in:
@@ -77,7 +77,8 @@ QDomElement ElementData::kindInfoToXml(QDomDocument &document)
|
|||||||
|
|
||||||
returned_elmt.appendChild(xml_type);
|
returned_elmt.appendChild(xml_type);
|
||||||
|
|
||||||
// NEU: max_slaves speichern
|
// Save max_slaves only if a specific limit is set (not default -1)
|
||||||
|
if (m_max_slaves != -1) {
|
||||||
auto xml_max_slaves = document.createElement(QStringLiteral("kindInformation"));
|
auto xml_max_slaves = document.createElement(QStringLiteral("kindInformation"));
|
||||||
xml_max_slaves.setAttribute(QStringLiteral("name"), QStringLiteral("max_slaves"));
|
xml_max_slaves.setAttribute(QStringLiteral("name"), QStringLiteral("max_slaves"));
|
||||||
auto max_slaves_txt = document.createTextNode(QString::number(m_max_slaves));
|
auto max_slaves_txt = document.createTextNode(QString::number(m_max_slaves));
|
||||||
@@ -85,6 +86,7 @@ QDomElement ElementData::kindInfoToXml(QDomDocument &document)
|
|||||||
|
|
||||||
returned_elmt.appendChild(xml_max_slaves);
|
returned_elmt.appendChild(xml_max_slaves);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (m_type == ElementData::Slave)
|
else if (m_type == ElementData::Slave)
|
||||||
{
|
{
|
||||||
//type
|
//type
|
||||||
|
|||||||
Reference in New Issue
Block a user