improve comit 2820

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2822 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-02-07 19:04:57 +00:00
parent 727b5d1a3d
commit c1f8cee179

View File

@@ -241,7 +241,7 @@ ConductorProperties::~ConductorProperties() {
*/
void ConductorProperties::toXml(QDomElement &e) const {
e.setAttribute("type", typeToString(type));
e.setAttribute("num", text);
if (color != QColor(Qt::black)) {
e.setAttribute("color", color.name());
@@ -249,11 +249,11 @@ void ConductorProperties::toXml(QDomElement &e) const {
if (type == Single) {
singleLineProperties.toXml(e);
} else if (type == Multi) {
e.setAttribute("numsize", text_size);
e.setAttribute("vertirotatetext", verti_rotate_text);
e.setAttribute("horizrotatetext", horiz_rotate_text);
}
e.setAttribute("num", text);
e.setAttribute("numsize", text_size);
e.setAttribute("vertirotatetext", verti_rotate_text);
e.setAttribute("horizrotatetext", horiz_rotate_text);
QString conductor_style = writeStyle();
if (!conductor_style.isEmpty()) {
@@ -278,8 +278,6 @@ void ConductorProperties::fromXml(QDomElement &e) {
// read style of conductor
readStyle(e.attribute("style"));
// qet text field
text = e.attribute("num");
if (e.attribute("type") == typeToString(Single)) {
// get specific properties for single conductor
@@ -288,11 +286,14 @@ void ConductorProperties::fromXml(QDomElement &e) {
} else if (e.attribute("type") == typeToString(Simple)) {
type = Simple;
} else {
text_size = e.attribute("numsize", QString::number(9)).toInt();
verti_rotate_text = e.attribute("vertirotatetext").toDouble();
horiz_rotate_text = e.attribute("horizrotatetext").toDouble();
type = Multi;
}
// get text field
text = e.attribute("num");
text_size = e.attribute("numsize", QString::number(9)).toInt();
verti_rotate_text = e.attribute("vertirotatetext").toDouble();
horiz_rotate_text = e.attribute("horizrotatetext").toDouble();
}
/**