]> git.saurik.com Git - wxWidgets.git/commitdiff
don't select first hit in index if it is multi-topic entry, it causes a dialog to...
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 22 Jul 2004 09:35:33 +0000 (09:35 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 22 Jul 2004 09:35:33 +0000 (09:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/helpfrm.cpp

index 0f48ca1d3567aa6abe82526df481900e9d0e5b81..9b9c95f4366302cc7b323f66910638d4c7421199 100644 (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;
         }
     }