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:
@@ -320,12 +320,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
void onToolsClicked(wxCommandEvent& evt)
|
void onToolsClicked(wxCommandEvent& evt)
|
||||||
{
|
{
|
||||||
|
if(m_browser_ctrl->GetCurrentURL() == "")
|
||||||
|
return;
|
||||||
|
|
||||||
tinySize->Check(false);
|
tinySize->Check(false);
|
||||||
smallSize->Check(false);
|
smallSize->Check(false);
|
||||||
mediumSize->Check(false);
|
mediumSize->Check(false);
|
||||||
largeSize->Check(false);
|
largeSize->Check(false);
|
||||||
largestSize->Check(false);
|
largestSize->Check(false);
|
||||||
|
|
||||||
wxWebViewZoom zoom = m_browser_ctrl->GetZoom();
|
wxWebViewZoom zoom = m_browser_ctrl->GetZoom();
|
||||||
switch (zoom)
|
switch (zoom)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user