X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/67a9999283b942053259fa418fe994eab8dd0b3b..3a9f2af7ff06a48441a86096cbadbce57dc23a9f:/src/html/helpfrm.cpp diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index 0f48ca1d35..fca7231c10 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -559,6 +559,8 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, wxHtmlHelpFrame::~wxHtmlHelpFrame() { + delete m_mergedIndex; + // PopEventHandler(); // wxhtmlhelpcontroller (not any more!) if (m_DataCreated) delete m_Data; @@ -1277,7 +1279,7 @@ void wxHtmlHelpFrame::OptionsDialog() enu.EnumerateFacenames(); m_NormalFonts = new wxArrayString; *m_NormalFonts = *enu.GetFacenames(); - m_NormalFonts->Sort(wxStringSortAscending); + m_NormalFonts->Sort(); // ascending sort } if (m_FixedFonts == NULL) { @@ -1285,7 +1287,7 @@ void wxHtmlHelpFrame::OptionsDialog() enu.EnumerateFacenames(wxFONTENCODING_SYSTEM, true /*enum fixed width only*/); m_FixedFonts = new wxArrayString; *m_FixedFonts = *enu.GetFacenames(); - m_FixedFonts->Sort(wxStringSortAscending); + m_FixedFonts->Sort(); // ascending sort } // VS: We want to show the font that is actually used by wxHtmlWindow. @@ -1632,8 +1634,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 +1684,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; } }