mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 18:50:52 +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
|
// initialise divers parametres lies a la modification des conducteurs
|
||||||
modified_path = true;
|
modified_path = true;
|
||||||
saveProfile();
|
saveProfile(false);
|
||||||
|
|
||||||
segmentsToPath();
|
segmentsToPath();
|
||||||
return(true);
|
return(true);
|
||||||
@@ -938,10 +938,11 @@ void Conducer::calculateTextItemPosition() {
|
|||||||
Sauvegarde le profil courant du conducteur pour l'utiliser ulterieurement
|
Sauvegarde le profil courant du conducteur pour l'utiliser ulterieurement
|
||||||
dans priv_modifieConducer.
|
dans priv_modifieConducer.
|
||||||
*/
|
*/
|
||||||
void Conducer::saveProfile() {
|
void Conducer::saveProfile(bool undo) {
|
||||||
ConducerProfile old_profile = conducer_profile;
|
ConducerProfile old_profile = conducer_profile;
|
||||||
conducer_profile.fromConducer(this);
|
conducer_profile.fromConducer(this);
|
||||||
if (Diagram *dia = diagram()) {
|
Diagram *dia = diagram();
|
||||||
|
if (undo && dia) {
|
||||||
dia -> undoStack().push(new ChangeConducerCommand(this, old_profile, conducer_profile));
|
dia -> undoStack().push(new ChangeConducerCommand(this, old_profile, conducer_profile));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class Conducer : public QGraphicsPathItem {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void segmentsToPath();
|
void segmentsToPath();
|
||||||
void saveProfile();
|
void saveProfile(bool = true);
|
||||||
void priv_calculeConducer(const QPointF &, QET::Orientation, const QPointF &, QET::Orientation);
|
void priv_calculeConducer(const QPointF &, QET::Orientation, const QPointF &, QET::Orientation);
|
||||||
void priv_modifieConducer(const QPointF &, QET::Orientation, const QPointF &, QET::Orientation);
|
void priv_modifieConducer(const QPointF &, QET::Orientation, const QPointF &, QET::Orientation);
|
||||||
uint nbSegments(QET::ConducerSegmentType = QET::Both) const;
|
uint nbSegments(QET::ConducerSegmentType = QET::Both) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user