Fix: start position of the selection may be incorrect

This commit is contained in:
2025-03-23 13:37:58 +09:00
parent bbace1896a
commit 0a29707c3c
2 changed files with 14 additions and 11 deletions
+4 -2
View File
@@ -45,12 +45,14 @@ class IMAGE_EDITOR_PLUS_OT_make_selection(bpy.types.Operator):
if area_session.selection_region:
area_session.selection_region[1] = region_pos
else:
area_session.selection_region = [region_pos, region_pos]
elif event.type == 'LEFTMOUSE':
if event.value == 'PRESS':
self.lmb = True
region_pos = [event.mouse_region_x, event.mouse_region_y]
area_session.selection_region = [region_pos, region_pos]
elif event.value == 'RELEASE':
self.lmb = False