From: Václav Slavík Date: Thu, 22 Jul 2004 09:35:33 +0000 (+0000) Subject: don't select first hit in index if it is multi-topic entry, it causes a dialog to... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d8b5a5175bf3ef52ed67db8efb2b7e12fdc0e5cf 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 --- 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; } }