more intelligent behaviour of wxHtmlWindow history: does not remember same page several times anymore
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -306,10 +306,15 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
|
|||||||
{
|
{
|
||||||
int c = m_History->GetCount() - (m_HistoryPos + 1);
|
int c = m_History->GetCount() - (m_HistoryPos + 1);
|
||||||
|
|
||||||
m_HistoryPos++;
|
if (m_HistoryPos < 0 ||
|
||||||
for (int i = 0; i < c; i++)
|
(*m_History)[m_HistoryPos].GetPage() != m_OpenedPage ||
|
||||||
m_History->Remove(m_HistoryPos);
|
(*m_History)[m_HistoryPos].GetAnchor() != m_OpenedAnchor)
|
||||||
m_History->Add(new wxHtmlHistoryItem(m_OpenedPage, m_OpenedAnchor));
|
{
|
||||||
|
m_HistoryPos++;
|
||||||
|
for (int i = 0; i < c; i++)
|
||||||
|
m_History->Remove(m_HistoryPos);
|
||||||
|
m_History->Add(new wxHtmlHistoryItem(m_OpenedPage, m_OpenedAnchor));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_OpenedPageTitle == wxEmptyString)
|
if (m_OpenedPageTitle == wxEmptyString)
|
||||||
|
Reference in New Issue
Block a user