Speed up opening big projects with lazy folios

This commit is contained in:
Laurent Trinques
2026-10-13 11:01:21 +02:00
parent a78e95be2c
commit 77e2a9bfc5
45 changed files with 3956 additions and 388 deletions
+19
View File
@@ -1645,6 +1645,25 @@ void DiagramView::editDiagramProperties()
DiagramPropertiesDialog::diagramPropertiesDialog(m_diagram, diagramEditor());
}
/**
@brief DiagramView::buildFolio
Build the items of the folio this view shows, and those of the folios
its cross-references need, if the project was opened without them
(QET_LAZY_FOLIOS); then fit the view to them.
*/
void DiagramView::buildFolio()
{
if (QETProject *project = m_diagram->project()) {
if (!project->unloadedFolioCount()) {
return;
}
project->buildFolioToShow(m_diagram);
} else {
m_diagram->ensureLoaded();
}
adjustSceneRect();
}
/**
@brief DiagramView::adjustSceneRect
Calcul and set the area of the scene visualized by this view