Fix dragging selection a second time: Don't replace image data!

This commit is contained in:
Isaiah Odhner 2023-04-21 18:25:29 -04:00
parent e98931e8ef
commit c5c9bd9425

View File

@ -1626,6 +1626,9 @@ class PaintApp(App):
sel.region.x - self.mouse_at_start[0],
sel.region.y - self.mouse_at_start[1],
)
if self.image.selection.contained_image:
# Already cut out, don't replace the image data.
return
# Cut out the selected part of the image from the document to use as the selection's image data.
# TODO: DRY with the below action handling
self.image_at_start = AnsiArtDocument(self.image.width, self.image.height)