Correctly stop the loading animation in the sample when we veto navigation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton 2011-08-17 13:46:09 +00:00
parent 3225a4b8b8
commit 0e830c7c52

View File

@ -533,11 +533,18 @@ void WebFrame::OnNavigationRequest(wxWebViewEvent& evt)
wxASSERT(m_browser->IsBusy());
//If we don't want to handle navigation then veto the event and navigation
//will not take place
//will not take place, we also need to stop the loading animation
if(!m_tools_handle_navigation->IsChecked())
{
evt.Veto();
UpdateState();
if (m_timer != NULL) m_timer->Stop(); // stop animation timer
m_toolbar->SetToolNormalBitmap(m_toolbar_tools->GetId(), wxBitmap(wxlogo_xpm));
m_toolbar->EnableTool( m_toolbar_stop->GetId(), false );
}
else
{
UpdateState();
}
}
/**