From f239a20092359e3c914adb79bd39f3f5d2b2e06f Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Fri, 12 Aug 2011 10:44:50 +0000 Subject: [PATCH] Fix history in wxWebViewIE when using a custom file scheme. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/webview_ie.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp index 868877c9ef..a02838dbdc 100644 --- a/src/msw/webview_ie.cpp +++ b/src/msw/webview_ie.cpp @@ -774,7 +774,13 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt) //As we are complete we also add to the history list, but not if the //page is not the main page, ie it is a subframe - if(m_historyEnabled && !m_historyLoadingFromList && url == GetCurrentURL()) + //We also have to check if we are loading a file:// url, if so we + //need to change the comparison as ie passes back a different style + //of url + if(m_historyEnabled && !m_historyLoadingFromList && + (url == GetCurrentURL() || + (GetCurrentURL().substr(0, 4) == "file" && + wxFileSystem::URLToFileName(GetCurrentURL()).GetFullPath() == url))) { //If we are not at the end of the list, then erase everything //between us and the end before adding the new page -- 2.45.2