Simply opened page notification code. Fix it to really highlight the
page currently visible, instead of the previous one.
Fixes #14320.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71665
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- void OnLink(wxHtmlLinkEvent& ev)
+ virtual bool LoadPage(const wxString& location)
- const wxMouseEvent *e = ev.GetLinkInfo().GetEvent();
- if (e == NULL || e->LeftUp())
- m_Window->NotifyPageChanged();
+ if ( !wxHtmlWindow::LoadPage(location) )
+ return false;
- // skip the event so that normal processing (i.e. following the link)
- // is done:
- ev.Skip();
+ m_Window->NotifyPageChanged();
+ return true;
}
// Returns full location with anchor (helper)
}
// Returns full location with anchor (helper)
wxHtmlHelpWindow *m_Window;
wxDECLARE_NO_COPY_CLASS(wxHtmlHelpHtmlWindow);
wxHtmlHelpWindow *m_Window;
wxDECLARE_NO_COPY_CLASS(wxHtmlHelpHtmlWindow);
-BEGIN_EVENT_TABLE(wxHtmlHelpHtmlWindow, wxHtmlWindow)
- EVT_HTML_LINK_CLICKED(wxID_ANY, wxHtmlHelpHtmlWindow::OnLink)
-END_EVENT_TABLE()
-
//---------------------------------------------------------------------------
// wxHtmlHelpWindow::m_mergedIndex
//---------------------------------------------------------------------------
// wxHtmlHelpWindow::m_mergedIndex
if (!url.empty())
{
m_HtmlWin->LoadPage(url);
if (!url.empty())
{
m_HtmlWin->LoadPage(url);
if (!url.empty())
{
m_HtmlWin->LoadPage(url);
if (!url.empty())
{
m_HtmlWin->LoadPage(url);
if (!it->items[0]->page.empty())
{
m_HtmlWin->LoadPage(it->items[0]->GetFullPath());
if (!it->items[0]->page.empty())
{
m_HtmlWin->LoadPage(it->items[0]->GetFullPath());
if (dlg.ShowModal() == wxID_OK)
{
m_HtmlWin->LoadPage(it->items[dlg.GetSelection()]->GetFullPath());
if (dlg.ShowModal() == wxID_OK)
{
m_HtmlWin->LoadPage(it->items[dlg.GetSelection()]->GetFullPath());
if (it)
{
m_HtmlWin->LoadPage(it->GetFullPath());
if (it)
{
m_HtmlWin->LoadPage(it->GetFullPath());
{
case wxID_HTML_BACK :
m_HtmlWin->HistoryBack();
{
case wxID_HTML_BACK :
m_HtmlWin->HistoryBack();
break;
case wxID_HTML_FORWARD :
m_HtmlWin->HistoryForward();
break;
case wxID_HTML_FORWARD :
m_HtmlWin->HistoryForward();
break;
case wxID_HTML_UP :
break;
case wxID_HTML_UP :
if (!it.page.empty())
{
m_HtmlWin->LoadPage(it.GetFullPath());
if (!it.page.empty())
{
m_HtmlWin->LoadPage(it.GetFullPath());
if (ind >= 0)
{
if (!it->page.empty())
if (ind >= 0)
{
if (!it->page.empty())
m_HtmlWin->LoadPage(it->GetFullPath());
m_HtmlWin->LoadPage(it->GetFullPath());
- NotifyPageChanged();
- }
while (contents[idx].GetFullPath() == page) idx++;
if (!contents[idx].page.empty())
while (contents[idx].GetFullPath() == page) idx++;
if (!contents[idx].page.empty())
m_HtmlWin->LoadPage(contents[idx].GetFullPath());
m_HtmlWin->LoadPage(contents[idx].GetFullPath());
- NotifyPageChanged();
- }
{
if (!it->page.empty())
m_HtmlWin->LoadPage(it->GetFullPath());
{
if (!it->page.empty())
m_HtmlWin->LoadPage(it->GetFullPath());
if (!str.empty() && str != _("(bookmarks)") && idx != wxNOT_FOUND)
{
m_HtmlWin->LoadPage(m_BookmarksPages[(size_t)idx]);
if (!str.empty() && str != _("(bookmarks)") && idx != wxNOT_FOUND)
{
m_HtmlWin->LoadPage(m_BookmarksPages[(size_t)idx]);