mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 22:38:32 +01:00
IDE: options, make sure the Selected Item is Visible in the CategoryTree
for example, shrink Options Dialog, select PreProcessor and close the Dialog, open it again.
This commit is contained in:
parent
2a5c8dd492
commit
bb69320587
@ -206,9 +206,15 @@ end;
|
||||
|
||||
procedure TIDEOptionsDialog.FormShow(Sender: TObject);
|
||||
begin
|
||||
// make the category visible in the treeview
|
||||
if (CategoryTree.Selected<>nil) and (CategoryTree.Selected.Parent<>nil) then
|
||||
CategoryTree.TopItem:=CategoryTree.Selected.Parent;
|
||||
// make sure the Selected Item is Visible,
|
||||
// and try to set the Top Category to TopItem.
|
||||
// 1. make the Top Category the TopItem and visible in the treeview
|
||||
// 2. make sure the Selected Item is Visible in the treeview
|
||||
if CategoryTree.Selected<>nil then begin
|
||||
CategoryTree.TopItem:=CategoryTree.Selected.GetParentNodeOfAbsoluteLevel(0);
|
||||
CategoryTree.Selected.MakeVisible;
|
||||
end;
|
||||
|
||||
// select first not empty category
|
||||
if (CategoryTree.Selected <> nil) and
|
||||
(CategoryTree.Selected.Data = nil) and // is group category
|
||||
|
||||
Loading…
Reference in New Issue
Block a user