Prevent unneeded fallback
Starting inbe8327bd54
, we assume that all exceptions in DoRePaint() are caused by OpenGL. But many calls in UpdateItems() will throw if there are internal errors such as std::out_of_range. Here, we catch those errors and simply skip ahead rather than falling back to Cairo (cherry picked from commit444801ada6
)
This commit is contained in:
parent
3ced3afa68
commit
c340760eaa
|
@ -212,7 +212,19 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
|
|||
try
|
||||
{
|
||||
cntUpd.Start();
|
||||
m_view->UpdateItems();
|
||||
try
|
||||
{
|
||||
m_view->UpdateItems();
|
||||
}
|
||||
catch( std::out_of_range& err )
|
||||
{
|
||||
// Don't do anything here but don't fail
|
||||
// This can happen when we don't catch `at()` calls
|
||||
wxString msg;
|
||||
msg.Printf( wxT( "Out of Range error: %s" ), err.what() );
|
||||
wxLogDebug( msg );
|
||||
}
|
||||
|
||||
cntUpd.Stop();
|
||||
|
||||
cntCtx.Start();
|
||||
|
|
Loading…
Reference in New Issue