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
This commit is contained in:
Václav Slavík 2004-07-22 09:35:33 +00:00
parent 68b47b2f09
commit d8b5a5175b

View File

@ -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;
}
}