]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix history in wxWebViewIE when using a custom file scheme.
authorSteve Lamerton <steve.lamerton@gmail.com>
Fri, 12 Aug 2011 10:44:50 +0000 (10:44 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Fri, 12 Aug 2011 10:44:50 +0000 (10:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/webview_ie.cpp

index 868877c9ef330a6d664702b16ebc3ccbf0bed6b5..a02838dbdcbd6e4233235b67b2c61c32e77a470c 100644 (file)
@@ -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