mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 01:59:34 +02:00
IDE: Remember selection after moving an item in package editor. Issue #40135.
This commit is contained in:
parent
59babefde7
commit
c8419bca6d
@ -398,8 +398,10 @@ end;
|
||||
|
||||
procedure TTreeFilterBranch.Move(CurIndex, NewIndex: integer);
|
||||
begin
|
||||
fOwner.StoreSelection;
|
||||
fOriginalData.Move(CurIndex, NewIndex);
|
||||
InvalidateBranch;
|
||||
fOwner.RestoreSelection;
|
||||
end;
|
||||
|
||||
{ TFileNameItem }
|
||||
@ -562,7 +564,7 @@ begin
|
||||
SelectNode:=Nil;
|
||||
// ToDo: support more than one items or otherwise clean the code.
|
||||
Assert(fSelectionList.Count < 2,
|
||||
'TTreeFilterEdit.RestoreSelection: fSelectionList has more than one items.');
|
||||
'TTreeFilterEdit.RestoreSelection: fSelectionList has more than one item.');
|
||||
if fSelectionList.Count > 0 then
|
||||
begin
|
||||
CurText:=fSelectionList[0];
|
||||
|
@ -2478,7 +2478,8 @@ begin
|
||||
FPropGui.SetDisableI18NCB(SelDisableI18NForLFM);
|
||||
|
||||
// move up/down (only single selection)
|
||||
aVisible:=(not (SortAlphabetically or SingleSelectedRemoved))
|
||||
aVisible := (FilterEdit.Filter='')
|
||||
and (not (SortAlphabetically or SingleSelectedRemoved))
|
||||
and ((SingleSelectedFile<>nil) or (SingleSelectedDep<>nil));
|
||||
MoveUpBtn.Enabled :=aVisible and Assigned(SingleSelectedNode.GetPrevVisibleSibling);
|
||||
MoveDownBtn.Enabled:=aVisible and Assigned(SingleSelectedNode.GetNextVisibleSibling);
|
||||
@ -2989,7 +2990,6 @@ begin
|
||||
FilesBranch.Move(OldIndex,NewIndex);
|
||||
UpdatePEProperties;
|
||||
UpdateStatusBar;
|
||||
//FilterEdit.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TPackageEditorForm.DoMoveDependency(Offset: integer);
|
||||
@ -3012,7 +3012,6 @@ begin
|
||||
RequiredBranch.Move(OldIndex,NewIndex);
|
||||
UpdatePEProperties;
|
||||
UpdateStatusBar;
|
||||
//FilterEdit.InvalidateFilter;
|
||||
end;
|
||||
|
||||
procedure TPackageEditorForm.DoSortFiles;
|
||||
|
Loading…
Reference in New Issue
Block a user