* Synchronize with main VTV repository up to svn rev 212

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2912 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2014-03-24 02:16:05 +00:00
parent 654d2a7381
commit 8e35e741ad

View File

@ -28,6 +28,9 @@ unit VirtualTrees;
//----------------------------------------------------------------------------------------------------------------------
//
// July 2009
// - Bug fix: pressing CTRL + PgUp/PgDown no longer leads to an index-out-of-bounds exception if no columns are used
// - Bug fix: avoided race condition between TBaseVirtualTree.DeleteNode and the worker thread
// - Bug fix: TBaseVirtualTree.ToggleNode could produce an overflow if range checking was enabled
// - Bug fix: TWorkerThread will no longer reference the tree after it has been destroyed (Mantis issue #384)
// - Improvement: removed support for Delphi versions older than Delphi 7
// - Improvement: removed local memory manager
@ -15812,6 +15815,34 @@ begin
end;
end;
VK_PRIOR:
if Shift = [ssCtrl, ssShift] then
SetOffsetX(FOffsetX + ClientWidth)
else
begin
if [ssShift] = Shift then
begin
if FFocusedColumn <= NoColumn then
NewColumn := FHeader.FColumns.GetFirstVisibleColumn
else
begin
Offset := FHeader.FColumns.GetVisibleFixedWidth;
NewColumn := FFocusedColumn;
while True do
begin
TempColumn := FHeader.FColumns.GetPreviousVisibleColumn(NewColumn);
NewWidth := FHeader.FColumns[NewColumn].Width;
if (TempColumn <= NoColumn) or
(Offset + NewWidth >= ClientWidth) or
(coFixed in FHeader.FColumns[TempColumn].FOptions) then
Break;
NewColumn := TempColumn;
Inc(Offset, NewWidth);
end;
end;
SetFocusedColumn(NewColumn);
end
else
begin
if ssCtrlOS in Shift then
SetOffsetY(FOffsetY + ClientHeight)
else
@ -15836,7 +15867,37 @@ begin
end;
FocusedNode := Node;
end;
end;
end;
VK_NEXT:
if Shift = [ssCtrl, ssShift] then
SetOffsetX(FOffsetX - ClientWidth)
else
begin
if [ssShift] = Shift then
begin
if FFocusedColumn <= NoColumn then
NewColumn := FHeader.FColumns.GetFirstVisibleColumn
else
begin
Offset := FHeader.FColumns.GetVisibleFixedWidth;
NewColumn := FFocusedColumn;
while True do
begin
TempColumn := FHeader.FColumns.GetNextVisibleColumn(NewColumn);
NewWidth := FHeader.FColumns[NewColumn].Width;
if (TempColumn <= NoColumn) or
(Offset + NewWidth >= ClientWidth) or
(coFixed in FHeader.FColumns[TempColumn].FOptions) then
Break;
NewColumn := TempColumn;
Inc(Offset, NewWidth);
end;
end;
SetFocusedColumn(NewColumn);
end
else
begin
if ssCtrlOS in Shift then
SetOffsetY(FOffsetY - ClientHeight)
else
@ -15861,6 +15922,8 @@ begin
end;
FocusedNode := Node;
end;
end;
end;
VK_UP:
begin
// scrolling without selection change
@ -24870,6 +24933,9 @@ begin
DoStateChange([], [tsHint]);
end;
if not ParentClearing then
InterruptValidation;
DeleteChildren(Node);
InternalDisconnectNode(Node, False, Reindex);
DoFreeNode(Node);
@ -29948,7 +30014,7 @@ begin
// on the position of the node to be collapsed.
R1 := GetDisplayRect(Node, NoColumn, False);
Mode2 := tamNoScroll;
HeightDelta := -Node.TotalHeight + NodeHeight[Node];
HeightDelta := -Integer(Node.TotalHeight) + Integer(NodeHeight[Node]);
if toChildrenAbove in FOptions.FPaintOptions then
begin
PosHoldable := (FOffsetY + (Integer(Node.TotalHeight - NodeHeight[Node]))) <= 0;