Les classes Conductor et Element heritent desormais de QObject.

Correction du bug #16 : Mauvaise gestion des modifications du texte d'un conducteur



git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@346 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavierqet
2008-07-09 21:14:30 +00:00
parent 9c6f602439
commit f4b828a3cd
12 changed files with 104 additions and 20 deletions

View File

@@ -63,12 +63,10 @@ Diagram *DiagramTextItem::diagram() const {
*/
void DiagramTextItem::focusOutEvent(QFocusEvent *e) {
QGraphicsTextItem::focusOutEvent(e);
// si le texte a ete modifie
// signale la modification du texte si besoin
if (toPlainText() != previous_text) {
if (Diagram *dia = diagram()) {
dia -> undoStack().push(new ChangeDiagramTextCommand(this, previous_text, toPlainText()));
previous_text = toPlainText();
}
emit(diagramTextChanged(this, previous_text, toPlainText()));
previous_text = toPlainText();
}
// deselectionne le texte