mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-19 07:40:06 +02:00
FilterEdit: improve the logic of moving in the list when using up/down keys.
git-svn-id: trunk@35672 -
This commit is contained in:
parent
c70cb74622
commit
083d8fdab4
@ -233,10 +233,12 @@ var
|
||||
i: Integer;
|
||||
begin
|
||||
i := GetFirstSelected + 1;
|
||||
if i < fFilteredListbox.Count then
|
||||
begin
|
||||
if fFilteredListbox.Count > 0 then begin
|
||||
UnselectAll;
|
||||
fFilteredListbox.Selected[i] := True;
|
||||
if i < fFilteredListbox.Count then
|
||||
fFilteredListbox.Selected[i] := True
|
||||
else
|
||||
fFilteredListbox.Selected[0] := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -245,10 +247,12 @@ var
|
||||
i: Integer;
|
||||
begin
|
||||
i := GetFirstSelected - 1;
|
||||
if i >= 0 then
|
||||
begin
|
||||
if fFilteredListbox.Count > 0 then begin
|
||||
UnselectAll;
|
||||
fFilteredListbox.Selected[i] := True;
|
||||
if i >= 0 then
|
||||
fFilteredListbox.Selected[i] := True
|
||||
else
|
||||
fFilteredListbox.Selected[fFilteredListbox.Count-1] := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -911,10 +911,8 @@ begin
|
||||
Result:=ANode;
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
Assert(Parent.Visible, 'TTreeNode.GetPrevVisible: Parent is not Visible');
|
||||
else
|
||||
Result := Parent;
|
||||
end;
|
||||
if (Result<>nil) and (TreeView<>nil) and (not TreeView.IsNodeVisible(Result)) then
|
||||
Result:=nil;
|
||||
end;
|
||||
@ -5632,8 +5630,8 @@ begin
|
||||
else
|
||||
ANode := Selected;
|
||||
if ANode <> nil then
|
||||
ANode := ANode.GetNextExpanded
|
||||
else if Items.Count > 0 then
|
||||
ANode := ANode.GetNextVisible;
|
||||
if (ANode = nil) and (Items.Count > 0) then
|
||||
ANode := FTreeNodes.GetFirstVisibleNode;
|
||||
if ANode <> nil then
|
||||
if tvoAllowMultiSelect in FOptions then
|
||||
@ -5651,8 +5649,8 @@ begin
|
||||
else
|
||||
ANode := Selected;
|
||||
if ANode <> nil then
|
||||
ANode := ANode.GetPrevExpanded
|
||||
else if Items.Count > 0 then
|
||||
ANode := ANode.GetPrevVisible;
|
||||
if (ANode = nil) and (Items.Count > 0) then
|
||||
ANode := Items.GetLastExpandedSubNode;
|
||||
if ANode <> nil then
|
||||
if tvoAllowMultiSelect in FOptions then
|
||||
|
Loading…
Reference in New Issue
Block a user