File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,9 @@ def text(self):
227
227
228
228
@text .setter
229
229
def text (self , new_text ):
230
+ current_anchored_position = self .anchored_position
230
231
self ._update_text (str (new_text ))
232
+ self .anchored_position = current_anchored_position
231
233
232
234
@property
233
235
def font (self ):
@@ -237,11 +239,13 @@ def font(self):
237
239
@font .setter
238
240
def font (self , new_font ):
239
241
old_text = self ._text
242
+ current_anchored_position = self .anchored_position
240
243
self ._text = ""
241
244
self ._font = new_font
242
245
bounds = self ._font .get_bounding_box ()
243
246
self .height = bounds [1 ]
244
247
self ._update_text (str (old_text ))
248
+ self .anchored_position = current_anchored_position
245
249
246
250
@property
247
251
def anchor_point (self ):
You can’t perform that action at this time.
0 commit comments