mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 06:20:53 +01:00
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:
@@ -81,11 +81,23 @@ AddTextCommand::~AddTextCommand() {
|
||||
|
||||
/// Annule l'ajout
|
||||
void AddTextCommand::undo() {
|
||||
QObject::disconnect(
|
||||
textitem,
|
||||
SIGNAL(diagramTextChanged(DiagramTextItem *, const QString &, const QString &)),
|
||||
diagram,
|
||||
SLOT(diagramTextChanged(DiagramTextItem *, const QString &, const QString &))
|
||||
);
|
||||
diagram -> removeItem(textitem);
|
||||
}
|
||||
|
||||
/// Refait l'ajour
|
||||
void AddTextCommand::redo() {
|
||||
QObject::connect(
|
||||
textitem,
|
||||
SIGNAL(diagramTextChanged(DiagramTextItem *, const QString &, const QString &)),
|
||||
diagram,
|
||||
SLOT(diagramTextChanged(DiagramTextItem *, const QString &, const QString &))
|
||||
);
|
||||
diagram -> addItem(textitem);
|
||||
textitem -> setPos(position);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user