mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 10:30:53 +01:00
Correction d'un bug lors du chargement d'un conducteur modifie
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@144 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -841,7 +841,7 @@ bool Conducer::fromXml(QDomElement &e) {
|
||||
|
||||
// initialise divers parametres lies a la modification des conducteurs
|
||||
modified_path = true;
|
||||
saveProfile();
|
||||
saveProfile(false);
|
||||
|
||||
segmentsToPath();
|
||||
return(true);
|
||||
@@ -938,10 +938,11 @@ void Conducer::calculateTextItemPosition() {
|
||||
Sauvegarde le profil courant du conducteur pour l'utiliser ulterieurement
|
||||
dans priv_modifieConducer.
|
||||
*/
|
||||
void Conducer::saveProfile() {
|
||||
void Conducer::saveProfile(bool undo) {
|
||||
ConducerProfile old_profile = conducer_profile;
|
||||
conducer_profile.fromConducer(this);
|
||||
if (Diagram *dia = diagram()) {
|
||||
Diagram *dia = diagram();
|
||||
if (undo && dia) {
|
||||
dia -> undoStack().push(new ChangeConducerCommand(this, old_profile, conducer_profile));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user