void DIALOG_DRC_CONTROL::InitValues() { // Connect events and objects m_ClearanceListBox->Connect( ID_CLEARANCE_LIST, wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickClearance ), NULL, this ); m_ClearanceListBox->Connect( ID_CLEARANCE_LIST, wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpClearance ), NULL, this ); m_UnconnectedListBox->Connect( ID_UNCONNECTED_LIST, wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL:: OnLeftDClickUnconnected ), NULL, this ); m_UnconnectedListBox->Connect( ID_UNCONNECTED_LIST, wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpUnconnected ), NULL, this ); m_DeleteCurrentMarkerButton->Enable( false ); DisplayDRCValues(); // Set the initial "enabled" status of the browse button and the text // field for report name wxCommandEvent junk; OnReportCheckBoxClicked( junk ); Layout(); // adding the units above expanded Clearance text, now resize. SetFocus(); }
void DIALOG_DRC_CONTROL::OnActivateDlg( wxActivateEvent& event ) { if( m_currentBoard != m_brdEditor->GetBoard() ) { // If m_currentBoard is not the current parent board, // (for instance because a new board was loaded), // close the dialog, because many pointers are now invalid // in lists SetReturnCode( wxID_CANCEL ); Close(); m_tester->DestroyDRCDialog( wxID_CANCEL ); return; } // updating data which can be modified outside the dialog (DRC parameters, units ...) // because the dialog is not modal m_BrdSettings = m_brdEditor->GetBoard()->GetDesignSettings(); DisplayDRCValues(); }
void DIALOG_DRC_CONTROL::InitValues() { m_markersTitleTemplate = m_Notebook->GetPageText( 0 ); m_unconnectedTitleTemplate = m_Notebook->GetPageText( 1 ); m_footprintsTitleTemplate = m_Notebook->GetPageText( 2 ); m_DeleteCurrentMarkerButton->Enable( false ); DisplayDRCValues(); // read options bool value; m_config->Read( DrcRefillZonesKey, &value, false ); m_cbRefillZones->SetValue( value ); m_config->Read( DrcTrackToZoneTestKey, &value, false ); m_cbReportTracksToZonesErrors->SetValue( value ); m_config->Read( DrcTestFootprintsKey, &value, false ); m_cbTestFootprints->SetValue( value ); Layout(); // adding the units above expanded Clearance text, now resize. SetFocus(); }