mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
Correction d'un bug lros de la pose d'un conducteur en zoomant sur le schema
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@91 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -45,10 +45,12 @@ Conducer::Conducer(Terminal *p1, Terminal* p2, Element *parent, QGraphicsScene *
|
|||||||
previous_z_value = zValue();
|
previous_z_value = zValue();
|
||||||
|
|
||||||
// ajout du champ de texte editable
|
// ajout du champ de texte editable
|
||||||
text_item = new QGraphicsTextItem(this, scene);
|
text_item = new QGraphicsTextItem();
|
||||||
text_item -> setPlainText("_");
|
text_item -> setPlainText("_");
|
||||||
text_item -> setTextInteractionFlags(Qt::TextEditorInteraction);
|
text_item -> setTextInteractionFlags(Qt::TextEditorInteraction);
|
||||||
calculateTextItemPosition();
|
calculateTextItemPosition();
|
||||||
|
scene -> addItem(text_item);
|
||||||
|
text_item -> setParentItem(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ void Terminal::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) {
|
|||||||
// derniere verification : verifier que cette borne n'est pas deja reliee a l'autre borne
|
// derniere verification : verifier que cette borne n'est pas deja reliee a l'autre borne
|
||||||
foreach (Conducer *f, liste_conducers) if (f -> terminal1 == p || f -> terminal2 == p) return;
|
foreach (Conducer *f, liste_conducers) if (f -> terminal1 == p || f -> terminal2 == p) return;
|
||||||
// autrement, on pose un conducteur
|
// autrement, on pose un conducteur
|
||||||
new Conducer(this, (Terminal *)qgi, 0, scene());
|
new Conducer(this, p, 0, scene());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user