@@ -59,53 +59,52 @@ struct CustomLayout {
59
59
borderWidth = _dom->attribute (" borderWidth" ).toShort ();
60
60
borderColor = _dom->attribute (" borderColor" ).toUInt ();
61
61
}
62
-
63
- // inner nodes (since 2.2.1)
64
- QDomNode node = _dom->firstChild ();
65
-
66
- if (!node.isNull ())
62
+ else
67
63
{
64
+ // inner nodes (since 2.2.1)
65
+ QDomNode node = _dom->firstChild ();
66
+
68
67
borderEnabled = false ;
69
68
mainEnabled = false ;
70
69
shadowEnabled = false ;
71
70
variationEnabled = false ;
72
- }
73
71
74
- while (!node.isNull ())
75
- {
76
- if (node.isElement ())
72
+ while (!node.isNull ())
77
73
{
78
- QDomElement element = node.toElement ();
79
-
80
- if (element.tagName () == " main" )
81
- {
82
- mainEnabled = true ;
83
- mainRows = element.attribute (" rows" ).toShort ();
84
- mainCols = element.attribute (" cols" ).toShort ();
85
- mainPos = static_cast <UM::ALIGN>(element.attribute (" pos" ).toInt ());
86
- }
87
- else if (element.tagName () == " border" )
88
- {
89
- borderEnabled = true ;
90
- borderWidth = element.attribute (" width" ).toShort ();
91
- borderColor = QColor (element.attribute (" color" )).rgb ();
92
- }
93
- else if (element.tagName () == " shadow" )
94
- {
95
- shadowEnabled = true ;
96
- shadowWidth = element.attribute (" width" ).toShort ();
97
- shadowColor = QColor (element.attribute (" color" )).rgb ();
98
- }
99
- else if (element.tagName () == " variation" )
100
- {
101
- variationEnabled = true ;
102
- angleVariation = element.attribute (" angle" ).toDouble ();
103
- sizeVariation = element.attribute (" size" ).toDouble ();
104
- posVariation = element.attribute (" pos" ).toDouble ();
105
- }
74
+ if (node.isElement ())
75
+ {
76
+ QDomElement element = node.toElement ();
77
+
78
+ if (element.tagName () == " main" )
79
+ {
80
+ mainEnabled = true ;
81
+ mainRows = element.attribute (" rows" ).toShort ();
82
+ mainCols = element.attribute (" cols" ).toShort ();
83
+ mainPos = static_cast <UM::ALIGN>(element.attribute (" pos" ).toInt ());
84
+ }
85
+ else if (element.tagName () == " border" )
86
+ {
87
+ borderEnabled = true ;
88
+ borderWidth = element.attribute (" width" ).toShort ();
89
+ borderColor = QColor (element.attribute (" color" )).rgb ();
90
+ }
91
+ else if (element.tagName () == " shadow" )
92
+ {
93
+ shadowEnabled = true ;
94
+ shadowWidth = element.attribute (" width" ).toShort ();
95
+ shadowColor = QColor (element.attribute (" color" )).rgb ();
96
+ }
97
+ else if (element.tagName () == " variation" )
98
+ {
99
+ variationEnabled = true ;
100
+ angleVariation = element.attribute (" angle" ).toDouble ();
101
+ sizeVariation = element.attribute (" size" ).toDouble ();
102
+ posVariation = element.attribute (" pos" ).toDouble ();
103
+ }
104
+ }
105
+
106
+ node = node.nextSibling ();
106
107
}
107
-
108
- node = node.nextSibling ();
109
108
}
110
109
}
111
110
0 commit comments