From b68f6ecc7e41b62c8bdee2d1ec30b21b3ab60bb4 Mon Sep 17 00:00:00 2001 From: robaho Date: Wed, 12 Feb 2020 19:36:16 -0600 Subject: [PATCH] fix issue #116 - text move leaves trail due to not tracking the preview rect properly --- Seashore/source/tool/TextTool.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Seashore/source/tool/TextTool.m b/Seashore/source/tool/TextTool.m index eb115533..2ce6234e 100644 --- a/Seashore/source/tool/TextTool.m +++ b/Seashore/source/tool/TextTool.m @@ -244,14 +244,16 @@ - (IBAction)preview:(id)sender { // Apply the changes if (running) { + IntRect oldRect = previewRect; [[document whiteboard] clearOverlay]; - if (previewRect.size.width != 0) { - [[document helpers] overlayChanged:previewRect]; - } if ([[[textbox textStorage] string] length] > 0) { result r = [self drawOverlay:YES]; - [[document helpers] overlayChanged:r.rect]; + previewRect = r.rect; } + IntRect dirty = previewRect; + if(oldRect.size.height>0 || oldRect.size.width>0) + dirty = IntSumRects(dirty,oldRect); + [[document helpers] overlayChanged:dirty]; } }