[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3597
Author: blacksun
Date: 2015-01-11 12:31:53 +0100 (Sun, 11 Jan 2015)
Log Message:
-----------
Bug fix
Modified Paths:
--------------
trunk/sources/qetgraphicsitem/conductor.cpp
Modified: trunk/sources/qetgraphicsitem/conductor.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/conductor.cpp 2015-01-11 11:10:57 UTC (rev 3596)
+++ trunk/sources/qetgraphicsitem/conductor.cpp 2015-01-11 11:31:53 UTC (rev 3597)
@@ -1469,10 +1469,13 @@
}
/**
- * @return l'editeur de schemas parent ou 0
+ * @brief Conductor::diagramEditor
+ * @return The parent diagram editor or nullptr;
*/
QETDiagramEditor* Conductor::diagramEditor() const {
- if (diagram()->views().isEmpty()) return 0;
+ if (!diagram()) return nullptr;
+ if (diagram() -> views().isEmpty()) return nullptr;
+
QWidget *w = const_cast<QGraphicsView *>(diagram() -> views().at(0));
while (w -> parentWidget() && !w -> isWindow()) {
w = w -> parentWidget();