@@ -198,15 +198,12 @@ def _reset_text(
198
198
if padding_right is not None :
199
199
self ._padding_right = max (0 , padding_right )
200
200
if anchor_point is not None :
201
- self .anchor_point = anchor_point
201
+ self ._anchor_point = anchor_point
202
202
if anchored_position is not None :
203
203
self ._anchored_position = anchored_position
204
204
if save_text is not None :
205
205
self ._save_text = save_text
206
- if (
207
- scale is not None
208
- ): # Scale will be defined in local_group (Note: self should have scale=1)
209
- self .scale = scale # call the setter
206
+
210
207
211
208
# if text is not provided as a parameter (text is None), use the previous value.
212
209
if (text is None ) and self ._save_text :
@@ -229,8 +226,8 @@ def _reset_text(
229
226
0 , # zero height with text == ""
230
227
)
231
228
# Clear out any items in the self Group, in case this is an update to the bitmap_label
232
- for _ in self :
233
- self .pop (0 )
229
+ for _ in self . local_group :
230
+ self .local_group . pop (0 )
234
231
235
232
else : # The text string is not empty, so create the Bitmap and TileGrid and
236
233
# append to the self Group
@@ -308,11 +305,19 @@ def _reset_text(
308
305
tight_box_y ,
309
306
)
310
307
308
+
309
+ if (
310
+ scale is not None
311
+ ): # Scale will be defined in local_group (Note: self should have scale=1)
312
+ self .scale = scale # call the setter
313
+
311
314
self .anchored_position = (
312
315
self ._anchored_position
313
316
) # set the anchored_position with setter after bitmap is created, sets the
314
317
# x,y positions of the label
315
318
319
+
320
+
316
321
@staticmethod
317
322
def _line_spacing_ypixels (font , line_spacing ):
318
323
# Note: Scaling is provided at the Group level
0 commit comments