void LIB_VIEW_FRAME::ExportToSchematicLibraryPart( wxCommandEvent& event ) { int ii = m_cmpList->GetSelection(); if( ii >= 0 ) { wxString part_name = m_cmpList->GetString( ii ); // a selection was made, pass true DismissModal( true, part_name ); } else { // no selection was made, pass false DismissModal( false ); } Close( true ); }
void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event ) { if( !IsModal() ) { Destroy(); } else if( !IsDismissed() ) { // only dismiss modal frame if not already dismissed. DismissModal( false ); // Modal frame will be destroyed by the calling function. } }
void FOOTPRINT_WIZARD_FRAME::OnCloseWindow( wxCloseEvent& Event ) { if( IsModal() ) { // Only dismiss a modal frame once, so that the return values set by // the prior DismissModal() are not bashed for ShowModal(). if( !IsDismissed() ) DismissModal( false ); } else { Destroy(); } }
void FOOTPRINT_WIZARD_FRAME::ExportSelectedFootprint( wxCommandEvent& aEvent ) { DismissModal( true ); Close(); }