LHelp: Show only the original CHM file's title in a tab. Issue #41467.

This commit is contained in:
Juha 2025-03-05 11:24:57 +02:00
parent 44d89018ab
commit 847dee461c

View File

@ -883,10 +883,18 @@ begin
end;
procedure TChmContentProvider.UpdateTitle;
var
{var
Item: TTreeNode;
NewTitle: String;
NewTitle: String; }
begin
// Now show only the first original CHM title.
if (Title = '') and (fContentsTree.Items.Count > 0) then
Title := fContentsTree.Items.GetFirstNode.Text;
// When opening LazUtils CHM file, then clicking links for FCL and RTL, the code generated this:
// "(LazUtils) Lazarus Utilities [(FCL) Free Component Library, (RTL) Runtime Library]"
// However it never changes again. It only gets updated when a CHM is loaded (ProcFillTOC).
{
Item:=nil;
if fContentsTree.Items.Count > 0 then
Item := fContentsTree.Items.GetFirstNode;
@ -910,6 +918,7 @@ begin
if NewTitle = '' then
NewTitle := DefaultCHMContentTitle;
Title := NewTitle;
}
end;
procedure TChmContentProvider.SetTitle(const AValue: String);