void SCH_EDIT_FRAME::DeleteAnnotation( bool aCurrentSheetOnly ) { if( aCurrentSheetOnly ) { SCH_SCREEN* screen = GetScreen(); wxCHECK_RET( screen != NULL, wxT( "Attempt to clear annotation of a NULL screen." ) ); screen->ClearAnnotation( m_CurrentSheet ); } else { SCH_SCREENS ScreenList; ScreenList.ClearAnnotation(); } // Update the references for the sheet that is currently being displayed. m_CurrentSheet->UpdateAllScreenReferences(); }