mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-25 07:24:21 +01:00
Speed up opening big projects with lazy folios
This commit is contained in:
@@ -1011,6 +1011,15 @@ bool TerminalStrip::fromXml(QDomElement &xml_element)
|
||||
auto xml_layout = xml_element.firstChildElement(QStringLiteral("layout"));
|
||||
if (!xml_layout.isNull())
|
||||
{
|
||||
//The folios holding its terminals are built (QET_LAZY_FOLIOS):
|
||||
//a strip is read with the project, before the database could
|
||||
//tell where any symbol is
|
||||
QSet<QUuid> terminals;
|
||||
const QDomNodeList xml_reals = xml_layout.elementsByTagName(RealTerminal::xmlTagName());
|
||||
for (int i = 0 ; i < xml_reals.size() ; ++i)
|
||||
terminals.insert(QUuid(xml_reals.at(i).toElement().attribute(QStringLiteral("element_uuid"))));
|
||||
m_project->buildFoliosHoldingSymbols(terminals);
|
||||
|
||||
//Get all free elements terminal of the project
|
||||
const ElementProvider ep(m_project);
|
||||
auto free_terminals = ep.freeTerminal();
|
||||
|
||||
Reference in New Issue
Block a user