Do not show the wxWebView sample tools menu unless a page has been loaded. Originally it crashed but it doesn't make sense to change the zoom or view the source if there is no page loaded.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@67787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-05-26 19:36:20 +00:00
parent 0773a33ca0
commit 46325534ef

View File

@@ -320,12 +320,15 @@ public:
*/
void onToolsClicked(wxCommandEvent& evt)
{
if(m_browser_ctrl->GetCurrentURL() == "")
return;
tinySize->Check(false);
smallSize->Check(false);
mediumSize->Check(false);
largeSize->Check(false);
largestSize->Check(false);
wxWebViewZoom zoom = m_browser_ctrl->GetZoom();
switch (zoom)
{