From 66f4b77ff34be1e688cacc98a9c422d4912a8590 Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Tue, 25 Apr 2023 17:35:44 -0400 Subject: [PATCH] Further clarify comment about selection cutout vs melding regions --- paint.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paint.py b/paint.py index fe20f1b..7f4216e 100755 --- a/paint.py +++ b/paint.py @@ -2102,8 +2102,10 @@ class PaintApp(App[None]): self.erase_region(sel.region, sel.mask) # TODO: Optimize the region storage. Right now I'm copying the whole image, - # because later when the selection is melded into the canvas, it currently - # falls under the same singular undo action. + # for the case of selection, because later, when the selection is melded into the canvas, + # it _implicitly updates_ the undo action, by changing the document without creating a new Action. + # This is the intended behavior, in that it allows the user to undo the + # selection and any changes to it as one action. But it's not efficient for large images. # I could: # - Update the region when melding to be the union of the two rectangles. # - Make Action support a list of regions, and add the new region on meld.