From d8b5a5175bf3ef52ed67db8efb2b7e12fdc0e5cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 22 Jul 2004 09:35:33 +0000 Subject: [PATCH] don't select first hit in index if it is multi-topic entry, it causes a dialog to pop up git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/helpfrm.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index 0f48ca1d35..9b9c95f436 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -1632,8 +1632,13 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event) if (displ++ == 0) { - m_IndexList->SetSelection(0); - DisplayIndexItem(&index[i]); + // don't automatically show topic selector if this + // item points to multiple pages: + if (index[i].items.size() == 1) + { + m_IndexList->SetSelection(0); + DisplayIndexItem(&index[i]); + } } // if this is nested item of the index, show its parent(s) @@ -1677,7 +1682,12 @@ void wxHtmlHelpFrame::OnIndexAll(wxCommandEvent& WXUNUSED(event)) m_IndexList->Append(index[i].name, (char*)(&index[i])); if (first) { - DisplayIndexItem(&index[i]); + // don't automatically show topic selector if this + // item points to multiple pages: + if (index[i].items.size() == 1) + { + DisplayIndexItem(&index[i]); + } first = false; } } -- 2.45.2