Bug fix : crash when edit the titleblock properties of an empty project (project without folio)

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4636 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-08-17 13:00:32 +00:00
parent 12477553a8
commit ea7780540e
3 changed files with 13 additions and 10 deletions

View File

@@ -116,10 +116,13 @@ QList<Diagram *> ProjectView::getDiagrams(ProjectSaveOptions options) {
}
/**
@return le schema actuellement active
*/
* @brief ProjectView::currentDiagram
* @return The current active diagram view or nullptr if there isn't diagramView in this project view.
*/
DiagramView *ProjectView::currentDiagram() const {
int current_tab_index = m_tab -> currentIndex();
if (current_tab_index == -1)
return nullptr;
return(diagram_ids_[current_tab_index]);
}