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]; } }