mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-20 19:19:58 +01:00
Fix : in some condition, dynamic text are not at the same position when open a project.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5406 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -88,11 +88,14 @@ CustomElement::CustomElement(const ElementsLocation &location, QGraphicsItem *qg
|
||||
- 8 : Aucune partie du dessin n'a pu etre chargee
|
||||
@return true si le chargement a reussi, false sinon
|
||||
*/
|
||||
bool CustomElement::buildFromXml(const QDomElement &xml_def_elmt, int *state) {
|
||||
bool CustomElement::buildFromXml(const QDomElement &xml_def_elmt, int *state)
|
||||
{
|
||||
m_state = QET::GIBuildingFromXml;
|
||||
|
||||
if (xml_def_elmt.tagName() != "definition" || xml_def_elmt.attribute("type") != "element")
|
||||
{
|
||||
if (state) *state = 4;
|
||||
m_state = QET::GIOK;
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -121,6 +124,7 @@ bool CustomElement::buildFromXml(const QDomElement &xml_def_elmt, int *state) {
|
||||
!validOrientationAttribute(xml_def_elmt)
|
||||
) {
|
||||
if (state) *state = 5;
|
||||
m_state = QET::GIOK;
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -131,6 +135,7 @@ bool CustomElement::buildFromXml(const QDomElement &xml_def_elmt, int *state) {
|
||||
if (xml_def_elmt.firstChild().isNull())
|
||||
{
|
||||
if (state) *state = 6;
|
||||
m_state = QET::GIOK;
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -203,7 +208,7 @@ bool CustomElement::buildFromXml(const QDomElement &xml_def_elmt, int *state) {
|
||||
{
|
||||
if (state)
|
||||
*state = 7;
|
||||
|
||||
m_state = QET::GIOK;
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
@@ -220,14 +225,14 @@ bool CustomElement::buildFromXml(const QDomElement &xml_def_elmt, int *state) {
|
||||
{
|
||||
if (state)
|
||||
*state = 8;
|
||||
|
||||
m_state = QET::GIOK;
|
||||
return(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state)
|
||||
*state = 0;
|
||||
|
||||
m_state = QET::GIOK;
|
||||
return(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user