Recent

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

Pascal

  • Hero Member
  • *****
  • Posts: 932
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 x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • 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

  • Hero Member
  • *****
  • Posts: 932
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 x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

 

TinyPortal © 2005-2018