diff --git a/common/widgets/lib_tree.cpp b/common/widgets/lib_tree.cpp index e1fa6296db..eff979f6d1 100644 --- a/common/widgets/lib_tree.cpp +++ b/common/widgets/lib_tree.cpp @@ -71,11 +71,11 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, LIB_TABLE* aLibTable, #if wxCHECK_VERSION( 3, 1, 1 ) m_query_ctrl->Bind( wxEVT_SEARCH, &LIB_TREE::onQueryEnter, this ); + m_query_ctrl->Bind( wxEVT_SEARCH_CANCEL, &LIB_TREE::onQueryText, this ); #else m_query_ctrl->Bind( wxEVT_TEXT_ENTER, &LIB_TREE::onQueryEnter, this ); + m_query_ctrl->Bind( wxEVT_SEARCHCTRL_CANCEL_BTN, &LIB_TREE::onQueryText, this ); #endif - m_query_ctrl->Bind( wxEVT_SEARCH_CANCEL, &LIB_TREE::onQueryText, this ); - m_query_ctrl->Bind( wxEVT_CHAR_HOOK, &LIB_TREE::onQueryCharHook, this ); diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 92eb9ece79..fa78f46aa7 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -349,7 +349,16 @@ void PCB_BASE_FRAME::FocusOnItem( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer ) } } - clippedPoly.BooleanIntersection( itemPoly, viewportPoly, SHAPE_POLY_SET::PM_FAST ); + try + { + clippedPoly.BooleanIntersection( itemPoly, viewportPoly, SHAPE_POLY_SET::PM_FAST ); + } + catch( const ClipperLib::clipperException& exc ) + { + // This may be overkill and could be an assertion but we are more likely to find + // any clipper errors this way. + wxLogError( wxT( "Clipper library exception '%s' occurred." ), exc.what() ); + } if( !clippedPoly.IsEmpty() ) itemPoly = clippedPoly;