Skip to content

Commit

Permalink
fix issue #116 - text move leaves trail due to not tracking the previ…
Browse files Browse the repository at this point in the history
…ew rect properly
  • Loading branch information
robaho committed Feb 13, 2020
1 parent 43c6ffd commit b68f6ec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Seashore/source/tool/TextTool.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}

Expand Down

0 comments on commit b68f6ec

Please sign in to comment.