-
Notifications
You must be signed in to change notification settings - Fork 268
Closed
Description
Reproduction Steps:
- compile Advanced with VT8.1.2.
- switch to 'Property tree simulation'.
- click an editable node, such as 'Title' or 'Theme'.
- the following error occurs:
---------------------------
Advanced
---------------------------
List index out of bounds (-1). TList<System.Classes.TCollectionItem> range is 0..1.
TBaseVirtualTree.DoEdit called TBaseVirtualTree.ScrollIntoView, but FFocusedColumn was not updated (it's still -1) before execute the following code
if Horizontally then
// 2) scroll horizontally
// Center only if there is enough space for the focused column, otherwise left align, see issue #397.
ScrolledHorizontally := ScrollIntoView(FFocusedColumn, Center and (R.Width <= (ClientWidth - Header.Columns.GetVisibleFixedWidth)), Node);
I manually update the FFocusedColumn before calling ScrollIntoView, and it works as expected, but I'm unsure if it's the most appropriate approach.
FFocusedColumn:= FEditColumn;
ScrollIntoView(FFocusedNode, toCenterScrollIntoView in FOptions.SelectionOptions, not (toDisableAutoscrollOnEdit in FOptions.AutoOptions));