@@ -41,7 +41,12 @@ bool Circle::getChangeState()
4141Circle &Circle::operator =(const Circle &other)
4242{
4343 if (entity.init )
44- entity = {centreX, centreY, radius, thickness, true };
44+ {
45+ entity.centreX = centreX;
46+ entity.centreY = centreY;
47+ entity.radius = radius;
48+ entity.thickness = thickness;
49+ }
4550
4651 centreX = other.centreX ;
4752 centreY = other.centreY ;
@@ -103,7 +108,16 @@ bool Rectangle::getChangeState()
103108Rectangle &Rectangle::operator =(const Rectangle &other)
104109{
105110 if (entity.init )
106- entity = {x, y, width, height, cornerRadius, thickness, fill, true };
111+ {
112+ entity.x = x;
113+ entity.y = y;
114+ entity.width = width;
115+ entity.height = height;
116+ entity.cornerRadius = cornerRadius;
117+ entity.thickness = thickness;
118+ entity.fill = fill;
119+ entity.init = true ;
120+ }
107121
108122 x = other.x ;
109123 y = other.y ;
@@ -168,7 +182,14 @@ bool Line::getChangeState()
168182Line &Line::operator =(const Line &other)
169183{
170184 if (entity.init )
171- entity = {startX, startY, endX, endY, thickness, true };
185+ {
186+ entity.startX = startX;
187+ entity.startY = startY;
188+ entity.endX = endX;
189+ entity.endY = endY;
190+ entity.thickness = thickness;
191+ entity.init = true ;
192+ }
172193
173194 startX = other.startX ;
174195 startY = other.startY ;
@@ -231,7 +252,14 @@ bool Bitmap::getChangeState()
231252Bitmap &Bitmap::operator =(const Bitmap &other)
232253{
233254 if (entity.init )
234- entity = {dataSet, x, y, width, height, true };
255+ {
256+ entity.dataSet = dataSet;
257+ entity.x = x;
258+ entity.y = y;
259+ entity.width = width;
260+ entity.height = height;
261+ entity.init = true ;
262+ }
235263
236264 dataSet = other.dataSet ;
237265 x = other.x ;
@@ -294,7 +322,12 @@ bool Text::getChangeState()
294322Text &Text::operator =(const Text &other)
295323{
296324 if (entity.init )
297- entity = {text, x, y, true };
325+ {
326+ entity.text = text;
327+ entity.x = x;
328+ entity.y = y;
329+ entity.init = true ;
330+ }
298331
299332 text = other.text ;
300333 x = other.x ;
@@ -355,7 +388,12 @@ bool HighlightedText::getChangeState()
355388HighlightedText &HighlightedText::operator =(const HighlightedText &other)
356389{
357390 if (entity.init )
358- entity = {text, x, y, true };
391+ {
392+ entity.text = text;
393+ entity.x = x;
394+ entity.y = y;
395+ entity.init = true ;
396+ }
359397
360398 text = other.text ;
361399 x = other.x ;
0 commit comments