+ //As we are complete we also add to the history list
+ if(m_historyEnabled && !m_historyLoadingFromList)
+ {
+ //If we are not at the end of the list, then erase everything
+ //between us and the end before adding the new page
+ if(m_historyPosition != m_historyList.size() - 1)
+ {
+ m_historyList.erase(m_historyList.begin() + m_historyPosition + 1,
+ m_historyList.end());
+ }
+ wxSharedPtr<wxWebHistoryItem> item(new wxWebHistoryItem(url, GetCurrentTitle()));
+ m_historyList.push_back(item);
+ m_historyPosition++;
+ }
+ //Reset as we are done now
+ m_historyLoadingFromList = false;