Permalink
Browse files

Merge pull request #43 from don-mccomb/bug1082138_cursorInvalidate

[Fixes bug #1082138] Fix text cursor not being fully painted.
  • Loading branch information...
2 parents aa0425d + d1c8f9e commit 41a5a17e7befe03065793315eca5062870533e22 @cameronwhite cameronwhite committed Nov 24, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 Pinta.Tools/Tools/TextTool.cs
@@ -932,9 +932,9 @@ private void RedrawText (bool showCursor, bool useTextLayer)
r.Inflate(10 + OutlineWidth, 10 + OutlineWidth);
CurrentTextBounds = r;
+ Rectangle cursorBounds = Rectangle.Zero;
Cairo.ImageSurface surf;
- var invalidate_cursor = old_cursor_bounds;
if (!useTextLayer)
{
@@ -998,8 +998,7 @@ private void RedrawText (bool showCursor, bool useTextLayer)
g.Antialias = Cairo.Antialias.None;
g.DrawLine (new Cairo.PointD (loc.X, loc.Y), new Cairo.PointD (loc.X, loc.Y + loc.Height), new Cairo.Color (0, 0, 0, 1), 1);
- loc.Inflate (2, 10);
- old_cursor_bounds = loc;
+ cursorBounds = Rectangle.Inflate (loc, 2, 10);
}
g.Restore ();
@@ -1033,10 +1032,12 @@ private void RedrawText (bool showCursor, bool useTextLayer)
}
}
-
InflateAndInvalidate(PintaCore.Workspace.ActiveDocument.CurrentUserLayer.previousTextBounds);
- PintaCore.Workspace.Invalidate(invalidate_cursor);
+ PintaCore.Workspace.Invalidate(old_cursor_bounds);
PintaCore.Workspace.Invalidate(r);
+ PintaCore.Workspace.Invalidate(cursorBounds);
+
+ old_cursor_bounds = cursorBounds;
}
/// <summary>

0 comments on commit 41a5a17

Please sign in to comment.