mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Fix crash when a .qet file with 0 diagrams.
This commit is contained in:
@@ -882,11 +882,14 @@ void ProjectView::loadDiagrams()
|
|||||||
addDiagram(sv);
|
addDiagram(sv);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->currentDiagram()->diagram()->loadElmtFolioSeq();
|
if (DiagramView *dv = currentDiagram())
|
||||||
this->currentDiagram()->diagram()->loadCndFolioSeq();
|
{
|
||||||
|
dv->diagram()->loadElmtFolioSeq();
|
||||||
|
dv->diagram()->loadCndFolioSeq();
|
||||||
|
}
|
||||||
|
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
// If project have the folios list, move it at the beginning of the project
|
// If project have the folios list, move it at the beginning of the project
|
||||||
if (m_project -> getFolioSheetsQuantity()) {
|
if (m_project -> getFolioSheetsQuantity()) {
|
||||||
for (int i = 0; i < m_project->getFolioSheetsQuantity(); i++)
|
for (int i = 0; i < m_project->getFolioSheetsQuantity(); i++)
|
||||||
m_tab -> tabBar() -> moveTab(diagram_views().size()-1, + (settings.value("projectview/foliolist_position").toInt() -1));
|
m_tab -> tabBar() -> moveTab(diagram_views().size()-1, + (settings.value("projectview/foliolist_position").toInt() -1));
|
||||||
|
|||||||
Reference in New Issue
Block a user