Ajout d'une action permettant de specifier le type de conducteur par defaut

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@178 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavierqet
2007-10-14 15:16:37 +00:00
parent 0216eac0be
commit 3f1f84debf
10 changed files with 360 additions and 2 deletions

View File

@@ -372,7 +372,9 @@ void Terminal::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) {
// derniere verification : verifier que cette borne n'est pas deja reliee a l'autre borne
foreach (Conductor *f, liste_conductors) if (f -> terminal1 == p || f -> terminal2 == p) return;
// autrement, on pose un conducteur
s -> undoStack().push(new AddConductorCommand(s, new Conductor(this, p)));
Conductor * new_conductor = new Conductor(this, p);
new_conductor -> setProperties(s -> defaultConductorProperties);
s -> undoStack().push(new AddConductorCommand(s, new_conductor));
}
}