mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-11 06:22:38 +02:00
undo
git-svn-id: trunk@36964 -
This commit is contained in:
parent
735a0623c4
commit
f9d8e01a08
@ -175,8 +175,6 @@ type
|
||||
procedure SwitchPositionWithSuccessor(aNode, aSuccessor: TAvgLvlTreeNode); override;
|
||||
public
|
||||
function GetNodeAtIndex(Index: integer): TIndexedAVLTreeNode;
|
||||
function NodeToIndex(Node: TAvgLvlTreeNode): SizeInt;
|
||||
function IndexOf(Data: Pointer): SizeInt;
|
||||
property Items[Index: SizeInt]: Pointer read GetItems; default;
|
||||
procedure ConsistencyCheck; override;
|
||||
function NodeToReportStr(aNode: TAvgLvlTreeNode): string; override;
|
||||
@ -1961,39 +1959,6 @@ begin
|
||||
until false;
|
||||
end;
|
||||
|
||||
function TIndexedAVLTree.NodeToIndex(Node: TAvgLvlTreeNode): SizeInt;
|
||||
var
|
||||
CurNode: TIndexedAVLTreeNode;
|
||||
CurParent: TIndexedAVLTreeNode;
|
||||
begin
|
||||
if Node=nil then exit(-1);
|
||||
|
||||
if fLastNode=Node then
|
||||
exit(fLastIndex);
|
||||
|
||||
CurNode:=TIndexedAVLTreeNode(Node);
|
||||
Result:=CurNode.LeftCount;
|
||||
repeat
|
||||
CurParent:=TIndexedAVLTreeNode(CurNode.Parent);
|
||||
if CurParent=nil then break;
|
||||
if CurParent.Right=CurNode then
|
||||
inc(Result,CurParent.LeftCount+1);
|
||||
CurNode:=CurParent;
|
||||
until false;
|
||||
|
||||
fLastNode:=TIndexedAVLTreeNode(Node);
|
||||
fLastIndex:=Result;
|
||||
end;
|
||||
|
||||
function TIndexedAVLTree.IndexOf(Data: Pointer): SizeInt;
|
||||
var
|
||||
Node: TAvgLvlTreeNode;
|
||||
begin
|
||||
Node:=FindPointer(Data);
|
||||
if Node=nil then exit(-1);
|
||||
Result:=NodeToIndex(Node);
|
||||
end;
|
||||
|
||||
procedure TIndexedAVLTree.ConsistencyCheck;
|
||||
|
||||
procedure E(Msg: string);
|
||||
@ -2015,19 +1980,8 @@ begin
|
||||
LeftCount:=0;
|
||||
if TIndexedAVLTreeNode(Node).LeftCount<>LeftCount then
|
||||
E(Format('Node.LeftCount=%d<>%d',[TIndexedAVLTreeNode(Node).LeftCount,LeftCount]));
|
||||
|
||||
if GetNodeAtIndex(i)<>Node then
|
||||
E(Format('GetNodeAtIndex(%d)<>%P',[i,Node]));
|
||||
fLastNode:=nil;
|
||||
if GetNodeAtIndex(i)<>Node then
|
||||
E(Format('GetNodeAtIndex(%d)<>%P',[i,Node]));
|
||||
|
||||
if NodeToIndex(Node)<>i then
|
||||
E(Format('NodeToIndex(%P)<>%d',[Node,i]));
|
||||
fLastNode:=nil;
|
||||
if NodeToIndex(Node)<>i then
|
||||
E(Format('NodeToIndex(%P)<>%d',[Node,i]));
|
||||
|
||||
inc(i);
|
||||
end;
|
||||
end;
|
||||
|
@ -396,7 +396,8 @@ type
|
||||
procedure SetIdleEvent(Enable: boolean);
|
||||
|
||||
procedure WMVScroll(var Msg: TLMScroll); message LM_VSCROLL;
|
||||
procedure WMMouseWheel(var Message: TLMMouseEvent); message LM_MOUSEWHEEL;
|
||||
procedure WMMouseWheel(var Message: TLMMouseEvent); message
|
||||
LM_MOUSEWHEEL;
|
||||
procedure SetBackgroundColor(const AValue: TColor);
|
||||
procedure SetReferences(const AValue: TColor);
|
||||
procedure SetSubPropertiesColor(const AValue: TColor);
|
||||
@ -442,7 +443,7 @@ type
|
||||
function TopMax: integer;
|
||||
procedure BuildPropertyList(OnlyIfNeeded: boolean = false);
|
||||
procedure Clear;
|
||||
procedure Paint; override;
|
||||
procedure Paint; override;
|
||||
procedure PropEditLookupRootChange;
|
||||
procedure RefreshPropertyValues;
|
||||
procedure ScrollToActiveItem;
|
||||
@ -1082,7 +1083,7 @@ begin
|
||||
then TopY := TopY -
|
||||
(Message.WheelDelta * (ClientHeight - DefaultItemHeight)) div 120
|
||||
// scrolling one line -> scroll half an item, see SB_LINEDOWN and SB_LINEUP
|
||||
// handler in WMVScroll
|
||||
// handler in WMVScrol
|
||||
else TopY := TopY -
|
||||
(Message.WheelDelta * Mouse.WheelScrollLines*DefaultItemHeight) div 240;
|
||||
Message.Result := 1;
|
||||
|
@ -2675,7 +2675,6 @@ type
|
||||
tvsManualNotify,
|
||||
tvsUpdating,
|
||||
tvsPainting,
|
||||
tvoFocusedPainting,
|
||||
tvsDblClicked,
|
||||
tvsTripleClicked,
|
||||
tvsQuadClicked,
|
||||
@ -3066,7 +3065,6 @@ type
|
||||
property DragCursor;
|
||||
property DragMode;
|
||||
property Enabled;
|
||||
property ExpandSignColor;
|
||||
property ExpandSignType;
|
||||
property Font;
|
||||
property HideSelection;
|
||||
@ -3142,6 +3140,7 @@ type
|
||||
property Items;
|
||||
property TreeLineColor;
|
||||
property TreeLinePenStyle;
|
||||
property ExpandSignColor;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -4407,10 +4407,6 @@ begin
|
||||
if [tvsUpdating,tvsPainting] * FStates <> [] then Exit;
|
||||
Include(FStates, tvsPainting);
|
||||
try
|
||||
if Focused then
|
||||
Include(FStates,tvoFocusedPainting)
|
||||
else
|
||||
Exclude(FStates,tvoFocusedPainting);
|
||||
if (tvoAutoItemHeight in fOptions) then
|
||||
UpdateDefaultItemHeight;
|
||||
UpdateScrollbars;
|
||||
@ -4775,7 +4771,7 @@ var
|
||||
if (tvoRowSelect in Options) and IsSelected then
|
||||
if tvoThemedDraw in Options then
|
||||
begin
|
||||
if tvoFocusedPainting in FStates then
|
||||
if Focused then
|
||||
Details := ThemeServices.GetElementDetails(ttItemSelected)
|
||||
else
|
||||
Details := ThemeServices.GetElementDetails(ttItemSelectedNotFocus);
|
||||
@ -4804,7 +4800,7 @@ var
|
||||
begin
|
||||
if IsSelected then
|
||||
begin
|
||||
if tvoFocusedPainting in FStates then
|
||||
if Focused then
|
||||
Details := ThemeServices.GetElementDetails(ttItemSelected)
|
||||
else
|
||||
Details := ThemeServices.GetElementDetails(ttItemSelectedNotFocus);
|
||||
|
Loading…
Reference in New Issue
Block a user