Update modal coordinates even if we are in relative mode

lethe/LATEST
Jan Petykiewicz 4 years ago
parent 86c1e4cd3b
commit 94555c1b6e

@ -2575,7 +2575,6 @@ def adjust_coordinates(record, modals: Modals, mx_field: str, my_field: str):
if record.x is not None:
if modals.xy_relative:
record.x += getattr(modals, mx_field)
else:
setattr(modals, mx_field, record.x)
else:
record.x = getattr(modals, mx_field)
@ -2583,7 +2582,6 @@ def adjust_coordinates(record, modals: Modals, mx_field: str, my_field: str):
if record.y is not None:
if modals.xy_relative:
record.y += getattr(modals, my_field)
else:
setattr(modals, my_field, record.y)
else:
record.y = getattr(modals, my_field)
@ -2672,6 +2670,7 @@ def dedup_coordinates(record, modals: Modals, mx_field: str, my_field: str):
mx = getattr(modals, mx_field)
if modals.xy_relative:
record.x -= mx
setattr(modals, mx_field, record.x)
else:
if record.x == mx:
record.x = None
@ -2682,6 +2681,7 @@ def dedup_coordinates(record, modals: Modals, mx_field: str, my_field: str):
my = getattr(modals, my_field)
if modals.xy_relative:
record.y -= my
setattr(modals, my_field, record.y)
else:
if record.y == my:
record.y = None

Loading…
Cancel
Save