mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 22:59:27 +02:00
* now lhelp tabs are not shown if the items they represent are not available
git-svn-id: trunk@17669 -
This commit is contained in:
parent
9a205e2a39
commit
45a0a8e636
@ -259,6 +259,8 @@ var
|
||||
Stream: TMemoryStream;
|
||||
fChm: TChmReader;
|
||||
ParentNode: TTreeNode;
|
||||
i: Integer;
|
||||
HasSearchIndex: Boolean = False;
|
||||
begin
|
||||
if fFillingToc = True then begin
|
||||
Application.QueueAsyncCall(@FillToc, Data);
|
||||
@ -283,8 +285,10 @@ begin
|
||||
DoFill(ParentNode);
|
||||
Free;
|
||||
end;
|
||||
Stream.Free;
|
||||
end;
|
||||
Stream.Free;
|
||||
fContentsTab.TabVisible := fContentsTree.Items.Count > 1;
|
||||
|
||||
// we fill the index here too but only for the main file
|
||||
if fChms.IndexOfObject(fChm) < 1 then
|
||||
begin
|
||||
@ -299,15 +303,24 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
fIndexTab.TabVisible := fIndexView.Items.Count > 0;
|
||||
if ParentNode.Index = 0 then ParentNode.Expanded := True;
|
||||
|
||||
|
||||
|
||||
fContentsTree.Visible := True;
|
||||
{$IFDEF CHM_DEBUG_TIME}
|
||||
writeln('Eind: ',FormatDateTime('hh:nn:ss.zzz', Now));
|
||||
{$ENDIF}
|
||||
fFillingToc := False;
|
||||
|
||||
i := 0;
|
||||
while (HasSearchIndex = False) and (i < fChms.Count) do
|
||||
begin
|
||||
HasSearchIndex := fChms.Chm[i].ObjectExists('/$FIftiMain') > 0;
|
||||
inc(i);
|
||||
end;
|
||||
|
||||
fSearchTab.TabVisible := HasSearchIndex;
|
||||
|
||||
end;
|
||||
|
||||
procedure TChmContentProvider.IpHtmlPanelDocumentOpen(Sender: TObject);
|
||||
|
Loading…
Reference in New Issue
Block a user