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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user