diff --git a/src/msw/webview_edge.cpp b/src/msw/webview_edge.cpp index 144effdd53..adca9b3b82 100644 --- a/src/msw/webview_edge.cpp +++ b/src/msw/webview_edge.cpp @@ -403,12 +403,21 @@ void wxWebViewEdge::LoadHistoryItem(wxSharedPtr item) wxVector > wxWebViewEdge::GetBackwardHistory() { - return m_impl->m_historyList; + wxVector > backhist; + //As we don't have std::copy or an iterator constructor in the wxwidgets + //native vector we construct it by hand + for (int i = 0; i < m_impl->m_historyPosition; i++) + { + backhist.push_back(m_impl->m_historyList[i]); + } + return backhist; } wxVector > wxWebViewEdge::GetForwardHistory() { wxVector > forwardhist; + //As we don't have std::copy or an iterator constructor in the wxwidgets + //native vector we construct it by hand for (int i = m_impl->m_historyPosition + 1; i < static_cast(m_impl->m_historyList.size()); i++) { forwardhist.push_back(m_impl->m_historyList[i]);