mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-21 22:01:31 +03:00
Fix dragging selection a second time: Don't replace image data!
This commit is contained in:
parent
e98931e8ef
commit
c5c9bd9425
3
paint.py
3
paint.py
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user