Skip to content

Commit 42611c7

Browse files
committed
Fixed issue #1186: Prevent repaint loop
1 parent 737c128 commit 42611c7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Source/VirtualTrees.Colors.pas

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,10 @@ procedure TVTColors.SetColor(const Index : TVTColorEnum; const Value : TColor);
234234
cBorderColor :
235235
RedrawWindow(FOwner.Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or RDW_NOERASE or RDW_NOCHILDREN)
236236
else
237-
FOwner.Invalidate;
238-
end;
239-
end;
237+
if not (tsPainting in TreeView.TreeStates) then // See issue #1186
238+
FOwner.Invalidate;
239+
end;//case
240+
end;// if
240241
end;
241242
end;
242243

0 commit comments

Comments
 (0)