From: Steve Lamerton Date: Wed, 18 May 2011 16:35:35 +0000 (+0000) Subject: Update wxWebViewIE::Reload so that reloading without using the cache works and doesn... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7aa18fc78675ced488adc9d42ad306a539334680 Update wxWebViewIE::Reload so that reloading without using the cache works and doesn't crash. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@67762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp index 668e1c8958..6bf16f78ce 100644 --- a/src/msw/webview_ie.cpp +++ b/src/msw/webview_ie.cpp @@ -380,27 +380,23 @@ void wxWebViewIE::Stop() void wxWebViewIE::Reload(wxWebViewReloadFlags flags) { - wxVariant out; + VARIANTARG level; + VariantInit(&level); + V_VT(&level) = VT_I2; - if (flags & wxWEB_VIEW_RELOAD_NO_CACHE) + switch(flags) { - wxVariant level(REFRESH_COMPLETELY, "VT_I2"); - //level = 3; - // VARIANTARG level; - // VariantInit(&level); - // V_VT(&level) = VT_I2; - // V_I2(&level) = REFRESH_COMPLETELY; - out = m_ie.CallMethod("Refresh2", &level); - } - else - { - out = m_ie.CallMethod("Refresh"); + case wxWEB_VIEW_RELOAD_DEFAULT: + V_I2(&level) = REFRESH_NORMAL; + break; + case wxWEB_VIEW_RELOAD_NO_CACHE: + V_I2(&level) = REFRESH_COMPLETELY; + break; + default: + wxFAIL_MSG("Unexpected reload type"); } - if (out.GetType() != "null") - { - wxMessageBox("Non-null return message : " + out.GetType()); - } + m_webBrowser->Refresh2(&level); } bool wxWebViewIE::IsOfflineMode()