Permalink
Browse files

Avoid redundant repainting of the IconBarMargin.

  • Loading branch information...
1 parent 9f70a1f commit 677f69bf46591eec7767d07129d3255d0951413d @dgrunwald dgrunwald committed Sep 20, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/IconBarMargin.cs
@@ -47,7 +47,11 @@ protected override void OnTextViewChanged(TextView oldTextView, TextView newText
void OnRedrawRequested(object sender, EventArgs e)
{
- InvalidateVisual();
+ // Don't invalidate the IconBarMargin if it'll be invalidated again once the
+ // visual lines become valid.
+ if (this.TextView != null && this.TextView.VisualLinesValid) {
+ InvalidateVisual();
+ }
}
public virtual void Dispose()

0 comments on commit 677f69b

Please sign in to comment.