summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docview/src/frm_main.pas11
1 files changed, 10 insertions, 1 deletions
diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas
index a6e8a8b6..a7a4d8cc 100644
--- a/docview/src/frm_main.pas
+++ b/docview/src/frm_main.pas
@@ -881,7 +881,8 @@ begin
// the "no results" place holder
exit;
Topic := lbSearchResults.Items.Objects[lbSearchResults.FocusItem] as TTopic;
- DisplayTopic( Topic );
+ if Topic <> nil then
+ DisplayTopic(Topic);
end;
procedure TMainForm.NavigateToHistoryIndex(AIndex: integer);
@@ -1802,8 +1803,16 @@ begin
//writeln('-----------------------------');
RichView.AddText(PChar(lText));
+ if CurrentTopic.ShowInContents then
+ begin
tvContents.Selection := tvContents.RootNode.FindSubNode(CurrentTopic, True);
tvContents.Invalidate;
+ end
+ else
+ begin
+ tvContents.Selection := nil;
+ tvContents.Invalidate;
+ end;
SaveNavigatePoint;
UpdateLocationPanel;
end;