X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b05206c98b0d11d98d324df1833dacd08f385913..7ab0c3adb780464f2ee58f88d2443f5a79a2c401:/src/html/helpfrm.cpp diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index 347f8d1d12..d51186b765 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -113,7 +113,9 @@ class wxHtmlHelpHtmlWindow : public wxHtmlWindow virtual void OnLinkClicked(const wxHtmlLinkInfo& link) { wxHtmlWindow::OnLinkClicked(link); - m_Frame->NotifyPageChanged(); + const wxMouseEvent *e = link.GetEvent(); + if (e == NULL || e->LeftUp()) + m_Frame->NotifyPageChanged(); } private: @@ -494,7 +496,11 @@ wxHtmlHelpFrame::~wxHtmlHelpFrame() delete m_Data; if (m_NormalFonts) delete m_NormalFonts; if (m_FixedFonts) delete m_FixedFonts; - if (m_PagesHash) delete m_PagesHash; + if (m_PagesHash) + { + WX_CLEAR_HASH_TABLE(*m_PagesHash); + delete m_PagesHash; + } } @@ -717,9 +723,12 @@ void wxHtmlHelpFrame::CreateContents() m_ContentsBox->Clear(); - if (m_PagesHash) delete m_PagesHash; + if (m_PagesHash) + { + WX_CLEAR_HASH_TABLE(*m_PagesHash); + delete m_PagesHash; + } m_PagesHash = new wxHashTable(wxKEY_STRING, 2 * m_Data->GetContentsCnt()); - m_PagesHash->DeleteContents(TRUE); int cnt = m_Data->GetContentsCnt(); int i; @@ -1308,8 +1317,8 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) pos = m_BookmarksNames.Index(item); if (pos != wxNOT_FOUND) { - m_BookmarksNames.Remove(pos); - m_BookmarksPages.Remove(pos); + m_BookmarksNames.RemoveAt(pos); + m_BookmarksPages.RemoveAt(pos); m_Bookmarks->Delete(m_Bookmarks->GetSelection()); } } @@ -1522,7 +1531,7 @@ void wxHtmlHelpFrame::OnCloseWindow(wxCloseEvent& evt) } #ifdef __WXMAC__ -void wxHtmlHelpFrame::OnQuit(wxCommandEvent& event) +void wxHtmlHelpFrame::OnClose(wxCommandEvent& event) { Close(TRUE); } @@ -1550,7 +1559,7 @@ BEGIN_EVENT_TABLE(wxHtmlHelpFrame, wxFrame) EVT_COMBOBOX(wxID_HTML_BOOKMARKSLIST, wxHtmlHelpFrame::OnBookmarksSel) EVT_CLOSE(wxHtmlHelpFrame::OnCloseWindow) #ifdef __WXMAC__ - EVT_MENU(wxID_CLOSE, wxHtmlHelpFrame::OnQuit) + EVT_MENU(wxID_CLOSE, wxHtmlHelpFrame::OnClose) EVT_MENU(wxID_ABOUT, wxHtmlHelpFrame::OnAbout) #endif