mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Bug fix
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3597 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -1469,10 +1469,13 @@ QSet<Conductor *> Conductor::relatedPotentialConductors(const bool all_diagram,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return l'editeur de schemas parent ou 0
|
* @brief Conductor::diagramEditor
|
||||||
|
* @return The parent diagram editor or nullptr;
|
||||||
*/
|
*/
|
||||||
QETDiagramEditor* Conductor::diagramEditor() const {
|
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));
|
QWidget *w = const_cast<QGraphicsView *>(diagram() -> views().at(0));
|
||||||
while (w -> parentWidget() && !w -> isWindow()) {
|
while (w -> parentWidget() && !w -> isWindow()) {
|
||||||
w = w -> parentWidget();
|
w = w -> parentWidget();
|
||||||
|
|||||||
Reference in New Issue
Block a user