@@ -62,12 +62,17 @@ def __init__(
62
62
super ().__init__ (datasource )
63
63
64
64
@property
65
- def same (self ) -> float :
65
+ def same (self ) -> typing . Optional [ float ] :
66
66
"""
67
67
| Get/set same value from/to (x, y)
68
+ | Or None if values differs
68
69
| |Accessors: Get Set|
69
70
"""
70
- return self .x
71
+ with self .batch ():
72
+ return _utils .ensure_same (
73
+ self .x ,
74
+ self .y ,
75
+ )
71
76
72
77
@same .setter
73
78
def same (self , value : float ):
@@ -130,12 +135,17 @@ def __init__(
130
135
super ().__init__ (datasource )
131
136
132
137
@property
133
- def same (self ) -> int :
138
+ def same (self ) -> typing . Optional [ int ] :
134
139
"""
135
140
| Get/set same value from/to (x, y)
141
+ | Or None if values differs
136
142
| |Accessors: Get Set|
137
143
"""
138
- return self .x
144
+ with self .batch ():
145
+ return _utils .ensure_same (
146
+ self .x ,
147
+ self .y ,
148
+ )
139
149
140
150
@same .setter
141
151
def same (self , value : int ):
@@ -207,12 +217,17 @@ def start(self, value: typing.Tuple[int, int]):
207
217
self .left , self .top = value
208
218
209
219
@property
210
- def start_same (self ) -> int :
220
+ def start_same (self ) -> typing . Optional [ int ] :
211
221
"""
212
222
| Get/set same value from/to (left, top)
223
+ | Or None if values differs
213
224
| |Accessors: Get Set|
214
225
"""
215
- return self .left
226
+ with self .batch ():
227
+ return _utils .ensure_same (
228
+ self .left ,
229
+ self .top ,
230
+ )
216
231
217
232
@start_same .setter
218
233
def start_same (self , value : int ):
@@ -232,24 +247,36 @@ def end(self, value: typing.Tuple[int, int]):
232
247
self .right , self .bottom = value
233
248
234
249
@property
235
- def end_same (self ) -> int :
250
+ def end_same (self ) -> typing . Optional [ int ] :
236
251
"""
237
252
| Get/set same value from/to (right, bottom)
253
+ | Or None if values differs
238
254
| |Accessors: Get Set|
239
255
"""
240
- return self .right
256
+ with self .batch ():
257
+ return _utils .ensure_same (
258
+ self .right ,
259
+ self .bottom ,
260
+ )
241
261
242
262
@end_same .setter
243
263
def end_same (self , value : int ):
244
264
self .end = value , value
245
265
246
266
@property
247
- def same (self ) -> int :
267
+ def same (self ) -> typing . Optional [ int ] :
248
268
"""
249
269
| Get/set same value from/to (left, top, right, bottom)
270
+ | Or None if values differs
250
271
| |Accessors: Get Set|
251
272
"""
252
- return self .left
273
+ with self .batch ():
274
+ return _utils .ensure_same (
275
+ self .left ,
276
+ self .top ,
277
+ self .right ,
278
+ self .bottom ,
279
+ )
253
280
254
281
@same .setter
255
282
def same (self , value : int ):
0 commit comments