Load project from xml is a little more faster

Like previous commit, in the method loadDiadrams() we call the method
diagramAdded(), in this method we call rebuildDiagramsMap()
updateAllTabsTitle() and these methods operate a loop for each existing
DiagramView.

Now loadDiagrams don't call diagramAdded (which must be used only when
user add a diagram during the use of QElectroTech) but make operations
itself and when all DiagramView are added, call rebuildDiagramsMap()
updateAllTabsTitle() only once.
This commit is contained in:
joshua
2021-05-14 15:47:10 +02:00
parent 71636ba874
commit fd9ab47041
2 changed files with 24 additions and 11 deletions

View File

@@ -87,10 +87,14 @@ class ProjectView : public QWidget
private:
ProjectView(const ProjectView &);
//Method related to construction of this class
void setProject(QETProject *project);
// methods
public:
QETProject *project();
void setProject(QETProject *);
QList<DiagramView *> diagram_views() const;
DiagramView *currentDiagram() const;
void closeEvent(QCloseEvent *) override;