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):
227227
228228 @text .setter
229229 def text (self , new_text ):
230+ current_anchored_position = self .anchored_position
230231 self ._update_text (str (new_text ))
232+ self .anchored_position = current_anchored_position
231233
232234 @property
233235 def font (self ):
@@ -237,11 +239,13 @@ def font(self):
237239 @font .setter
238240 def font (self , new_font ):
239241 old_text = self ._text
242+ current_anchored_position = self .anchored_position
240243 self ._text = ""
241244 self ._font = new_font
242245 bounds = self ._font .get_bounding_box ()
243246 self .height = bounds [1 ]
244247 self ._update_text (str (old_text ))
248+ self .anchored_position = current_anchored_position
245249
246250 @property
247251 def anchor_point (self ):
You can’t perform that action at this time.
0 commit comments