Fix: start position of the selection may be incorrect
This commit is contained in:
+10
-9
@@ -1,5 +1,5 @@
|
||||
'''
|
||||
Copyright (C) 2021 - 2024 Akaneyu
|
||||
Copyright (C) 2021 - 2025 Akaneyu
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -136,17 +136,18 @@ def draw_handler():
|
||||
|
||||
# release the selection if the image is changed
|
||||
if area_session.selection or area_session.selection_region:
|
||||
if img != area_session.prev_image:
|
||||
cancel_selection(context)
|
||||
if area_session.prev_image:
|
||||
if img != area_session.prev_image:
|
||||
cancel_selection(context)
|
||||
|
||||
elif width != area_session.prev_image_width \
|
||||
or height != area_session.prev_image_height:
|
||||
elif width != area_session.prev_image_width \
|
||||
or height != area_session.prev_image_height:
|
||||
|
||||
crop_selection(context)
|
||||
crop_selection(context)
|
||||
|
||||
area_session.prev_image = img
|
||||
area_session.prev_image_width = width
|
||||
area_session.prev_image_height = height
|
||||
area_session.prev_image = img
|
||||
area_session.prev_image_width = width
|
||||
area_session.prev_image_height = height
|
||||
|
||||
if area_session.layer_moving \
|
||||
or area_session.layer_rotating \
|
||||
|
||||
Reference in New Issue
Block a user