void DIALOG_DRC_CONTROL::OnDeleteOneClick( wxCommandEvent& event ) { int selectedIndex; int curTab = m_Notebook->GetSelection(); if( curTab == 0 ) { selectedIndex = m_ClearanceListBox->GetSelection(); if( selectedIndex != wxNOT_FOUND ) { m_ClearanceListBox->DeleteItem( selectedIndex ); // redraw the pcb RedrawDrawPanel(); } } else if( curTab == 1 ) { selectedIndex = m_UnconnectedListBox->GetSelection(); if( selectedIndex != wxNOT_FOUND ) { m_UnconnectedListBox->DeleteItem( selectedIndex ); /* these unconnected DRC_ITEMs are not currently visible on the pcb * RedrawDrawPanel(); */ } } UpdateDisplayedCounts(); }
void DIALOG_DRC_CONTROL::OnDeleteAllClick( wxCommandEvent& event ) { DelDRCMarkers(); RedrawDrawPanel(); UpdateDisplayedCounts(); }
void DIALOG_DRC_CONTROL::OnListUnconnectedClick( wxCommandEvent& event ) { wxString reportName; bool make_report = m_CreateRptCtrl->IsChecked(); if( make_report ) // Create a file rpt { reportName = m_RptFilenameCtrl->GetValue(); if( reportName.IsEmpty() ) { wxCommandEvent junk; OnButtonBrowseRptFileClick( junk ); } if( !reportName.IsEmpty() ) reportName = makeValidFileNameReport(); } SetDrcParmeters(); m_tester->SetSettings( true, // Pad to pad DRC test enabled true, // unconnected pads DRC test enabled true, // DRC test for zones enabled true, // DRC test for keepout areas enabled reportName, make_report ); DelDRCMarkers(); wxBeginBusyCursor(); m_Messages->Clear(); m_tester->ListUnconnectedPads(); m_Notebook->ChangeSelection( 1 ); // display the 2nd tab "Unconnected..." // Generate the report if( !reportName.IsEmpty() ) { if( writeReport( reportName ) ) { wxString msg; msg.Printf( _( "Report file \"%s\" created" ), GetChars( reportName ) ); wxString caption( _( "Disk File Report Completed" ) ); wxMessageDialog popupWindow( this, msg, caption ); popupWindow.ShowModal(); } else DisplayError( this, wxString::Format( _( "Unable to create report file '%s' "), GetChars( reportName ) ) ); } UpdateDisplayedCounts(); wxEndBusyCursor(); /* there is currently nothing visible on the DrawPanel for unconnected pads * RedrawDrawPanel(); */ }