mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 02:59:15 +02:00
IDEIntf: fixed registering options frames with same index
git-svn-id: trunk@57983 -
This commit is contained in:
parent
7696ca4753
commit
dec751c07b
@ -809,16 +809,17 @@ end;
|
||||
function TIDEOptionsEditorList.Add(AEditorClass: TAbstractIDEOptionsEditorClass;
|
||||
AIndex, AParent: Integer): PIDEOptionsEditorRec;
|
||||
begin
|
||||
Result := GetByIndex(AIndex);
|
||||
if Result = nil then
|
||||
begin
|
||||
New(Result);
|
||||
Result^.Index := AIndex;
|
||||
Result^.Parent := AParent;
|
||||
Result^.Collapsed := AEditorClass.DefaultCollapseChildNodes;
|
||||
Result^.DefaultCollapsed := AEditorClass.DefaultCollapseChildNodes;
|
||||
inherited Add(Result);
|
||||
end;
|
||||
repeat
|
||||
Result := GetByIndex(AIndex);
|
||||
if Result = nil then break;
|
||||
inc(AIndex);
|
||||
until false;
|
||||
New(Result);
|
||||
Result^.Index := AIndex;
|
||||
Result^.Parent := AParent;
|
||||
Result^.Collapsed := AEditorClass.DefaultCollapseChildNodes;
|
||||
Result^.DefaultCollapsed := AEditorClass.DefaultCollapseChildNodes;
|
||||
inherited Add(Result);
|
||||
|
||||
Result^.EditorClass := AEditorClass;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user