* Fixed using topic id instead of context id

git-svn-id: trunk@30857 -
This commit is contained in:
andrew 2011-05-22 13:36:51 +00:00
parent f7ef16776e
commit f6b299e26a

View File

@ -986,8 +986,7 @@ var
FileIndex: Integer;
LoadTOC: Boolean;
CurCHM: TChmReader;
ContextURL,
ContextTitle: String;
ContextURL: String;
begin
Result := False;
fFile := Copy(AUrl,8, Length(AURL));
@ -1016,7 +1015,7 @@ begin
// AContext will override the url if it is found
if AContext <> -1 then
begin
ContextURL := CurCHM.LookupTopicByID(AContext, ContextTitle);
ContextURL := CurCHM.GetContextUrl(AContext);
if (Length(ContextURL) > 0) and not (ContextURL[1] in ['/', '\']) then
Insert('/', ContextURL , 1);
if Length(ContextURL) > 0 then