Simplification du code permettant la mise a jour des conducteurs lors des deplacements et rotations d'elements.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@984 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2010-05-04 20:18:30 +00:00
parent b073351872
commit f610efef8d
9 changed files with 21 additions and 41 deletions

View File

@@ -134,18 +134,10 @@ void Conductor::update(const QRectF &rect) {
@param b Borne
@param newpos position de la borne b
*/
void Conductor::updateWithNewPos(const QRectF &rect, const Terminal *b, const QPointF &newpos) {
void Conductor::updateWithNewPos(const QRectF &rect) {
QPointF p1, p2;
if (b == terminal1) {
p1 = newpos;
p2 = terminal2 -> dockConductor();
} else if (b == terminal2) {
p1 = terminal1 -> dockConductor();
p2 = newpos;
} else {
p1 = terminal1 -> dockConductor();
p2 = terminal2 -> dockConductor();
}
p1 = terminal1 -> dockConductor();
p2 = terminal2 -> dockConductor();
if (nbSegments() && !conductor_profiles[currentPathType()].isNull())
priv_modifieConductor(p1, terminal1 -> orientation(), p2, terminal2 -> orientation());
else