pygui: fixed issue with moving text shapes
This commit is contained in:
parent
41df8a57b8
commit
8979c86187
1 changed files with 2 additions and 1 deletions
|
@ -157,10 +157,11 @@ class Shape:
|
|||
original_position = self.canvas.coords(self.id)
|
||||
self.canvas.move(self.id, x_offset, y_offset)
|
||||
coords = self.canvas.coords(self.id)
|
||||
if self.shape_type == ShapeType.TEXT:
|
||||
coords = coords * 2
|
||||
if not self.canvas.valid_position(*coords):
|
||||
self.canvas.coords(self.id, original_position)
|
||||
return
|
||||
|
||||
self.canvas.move_selection(self.id, x_offset, y_offset)
|
||||
if self.text_id is not None:
|
||||
self.canvas.move(self.text_id, x_offset, y_offset)
|
||||
|
|
Loading…
Reference in a new issue