Skip to content

Commit

Permalink
Fixed issue #760: TVirtualTreeColumns.GetFirstVisibleColumn() cause A…
Browse files Browse the repository at this point in the history
…V if called between BeginUpdate() and EndUpdate()
  • Loading branch information
Joachim Marder committed Feb 14, 2018
1 parent 777ca17 commit aeb68be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- We do no longer test on Windows XP/2003
- We may accept pull request for XP support if the code quality is sufficient.
- We recommend to use the V6 branch on Windows XP
* Fixed issue #760: TVirtualTreeColumns.GetFirstVisibleColumn() cause AV if called between BeginUpdate() and EndUpdate()
* Fixed issue #759: TBaseVirtualTree.InitNode() overrides check state of top level nodes set in OnInitNode event handler
* Fixed issue #757: Header popup menu opens twice
* Fixed issue #758: The OnColumnVisibilityChanged event is not always fired
Expand Down
4 changes: 4 additions & 0 deletions Source/VirtualTrees.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8914,6 +8914,8 @@ function TVirtualTreeColumns.GetFirstVisibleColumn(ConsiderAllowFocus: Boolean =

begin
Result := InvalidColumn;
if (UpdateCount > 0) or (csLoading in Header.TreeView.ComponentState) then
exit; // See issue #760
for I := 0 to Count - 1 do
if (coVisible in Items[FPositionToIndex[I]].FOptions) and
( (not ConsiderAllowFocus) or
Expand All @@ -8938,6 +8940,8 @@ function TVirtualTreeColumns.GetLastVisibleColumn(ConsiderAllowFocus: Boolean =

begin
Result := InvalidColumn;
if (UpdateCount > 0) or (csLoading in Header.TreeView.ComponentState) then
exit; // See issue #760
for I := Count - 1 downto 0 do
if (coVisible in Items[FPositionToIndex[I]].FOptions) and
( (not ConsiderAllowFocus) or
Expand Down

0 comments on commit aeb68be

Please sign in to comment.