mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-14 09:14:14 +02:00
Speed up opening big projects with lazy folios
This commit is contained in:
@@ -335,6 +335,10 @@ void CableManager::refreshLabels(QETProject *project)
|
||||
QString label;
|
||||
};
|
||||
|
||||
//Without cables, the folios not built hold nothing this pass
|
||||
//changes but stale references (QETProject::cableLabelFolios())
|
||||
const QList<Diagram *> folios = project->cableLabelFolios();
|
||||
|
||||
QHash<QUuid, Binding> bindings;
|
||||
for (Cable *cable : project->cables())
|
||||
{
|
||||
@@ -361,7 +365,7 @@ void CableManager::refreshLabels(QETProject *project)
|
||||
//the core or the link does.
|
||||
QHash<QUuid, Conductor *> conductors_by_uuid;
|
||||
QHash<Element *, QList<Conductor *>> endings_on_report;
|
||||
for (Diagram *diagram : project->diagrams())
|
||||
for (Diagram *diagram : folios)
|
||||
{
|
||||
if (!diagram) continue;
|
||||
for (Conductor *conductor : diagram->conductors())
|
||||
@@ -440,7 +444,7 @@ void CableManager::refreshLabels(QETProject *project)
|
||||
}
|
||||
}
|
||||
|
||||
for (Diagram *diagram : project->diagrams())
|
||||
for (Diagram *diagram : folios)
|
||||
{
|
||||
if (!diagram) continue;
|
||||
for (Conductor *conductor : diagram->conductors())
|
||||
|
||||
Reference in New Issue
Block a user