* * *

Author Topic: SynEdit.Invalidate does not invalidate/repaint TSynGutterLineOverview  (Read 800 times)

Pascal

  • Sr. Member
  • ****
  • Posts: 479
I've build a custom SynEdit with a TSynGutterLineOverview in RightGutter.
One provider is TSynGutterLOvProviderModifiedLines.
When i now change the state of the lines by TSynEditStringList(fEdit.GetTextBuffer).MarkModified(start, stop) and
call Invalidate the left gutter is updated but the right isn't. I have to resize the SynEdit. Also Paint does not work.
Maybe this is due to the empty Paint method of TSynGutterLineOverview.

SynEdit Invalidate should repaint complete Synedit including providers of TSynGutterLineOverview.
How can i fix this?

One nasty workaround would be:
Code: Pascal  [Select]
  1. TSynGutterLineOverview.Visible := false;
  2. TSynGutterLineOverview.Visible := true;
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4323
    • wiki
Re: SynEdit.Invalidate does not invalidate/repaint TSynGutterLineOverview
« Reply #1 on: February 10, 2017, 06:23:43 pm »
please report as a bug.

As a workaround try InvalidateLines

--------------
the overview gutter, creates a new panel (its own wincontrol), so paint an invalidate are done there.

Doing this, reduces the overall amount of repaint needed.

Pascal

  • Sr. Member
  • ****
  • Posts: 479
Re: SynEdit.Invalidate does not invalidate/repaint TSynGutterLineOverview
« Reply #2 on: February 13, 2017, 08:30:24 am »
As a workaround try InvalidateLines

InvalidateLines(-1, -1) does not work.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus