Don't allow schematic/pcb DRC tests when in standalone mode.

Fixes https://gitlab.com/kicad/code/kicad/issues/5635
This commit is contained in:
Jeff Young 2020-09-15 21:13:48 +01:00
parent e2e229da96
commit b6a8e165c3
2 changed files with 15 additions and 6 deletions

View File

@ -98,6 +98,9 @@ DIALOG_DRC::DIALOG_DRC( PCB_EDIT_FRAME* aEditorFrame, wxWindow* aParent ) :
m_footprintWarningsTreeModel = new RC_TREE_MODEL( m_brdEditor, m_footprintsDataView ); m_footprintWarningsTreeModel = new RC_TREE_MODEL( m_brdEditor, m_footprintsDataView );
m_footprintsDataView->AssociateModel( m_footprintWarningsTreeModel ); m_footprintsDataView->AssociateModel( m_footprintWarningsTreeModel );
if( Kiface().IsSingle() )
m_cbTestFootprints->Hide();
m_Notebook->SetSelection( 0 ); m_Notebook->SetSelection( 0 );
// We use a sdbSizer here to get the order right, which is platform-dependent // We use a sdbSizer here to get the order right, which is platform-dependent
@ -122,7 +125,10 @@ DIALOG_DRC::~DIALOG_DRC()
settings->m_DrcDialog.refill_zones = m_cbRefillZones->GetValue(); settings->m_DrcDialog.refill_zones = m_cbRefillZones->GetValue();
settings->m_DrcDialog.test_track_to_zone = m_cbReportTracksToZonesErrors->GetValue(); settings->m_DrcDialog.test_track_to_zone = m_cbReportTracksToZonesErrors->GetValue();
settings->m_DrcDialog.test_all_track_errors = m_cbReportAllTrackErrors->GetValue(); settings->m_DrcDialog.test_all_track_errors = m_cbReportAllTrackErrors->GetValue();
if( !Kiface().IsSingle() )
settings->m_DrcDialog.test_footprints = m_cbTestFootprints->GetValue(); settings->m_DrcDialog.test_footprints = m_cbTestFootprints->GetValue();
settings->m_DrcDialog.severities = m_severities; settings->m_DrcDialog.severities = m_severities;
m_markerTreeModel->DecRef(); m_markerTreeModel->DecRef();
@ -176,6 +182,8 @@ void DIALOG_DRC::initValues()
m_cbRefillZones->SetValue( cfg->m_DrcDialog.refill_zones ); m_cbRefillZones->SetValue( cfg->m_DrcDialog.refill_zones );
m_cbReportTracksToZonesErrors->SetValue( cfg->m_DrcDialog.test_track_to_zone ); m_cbReportTracksToZonesErrors->SetValue( cfg->m_DrcDialog.test_track_to_zone );
m_cbReportAllTrackErrors->SetValue( cfg->m_DrcDialog.test_all_track_errors ); m_cbReportAllTrackErrors->SetValue( cfg->m_DrcDialog.test_all_track_errors );
if( Kiface().IsSingle() )
m_cbTestFootprints->SetValue( cfg->m_DrcDialog.test_footprints ); m_cbTestFootprints->SetValue( cfg->m_DrcDialog.test_footprints );
m_severities = cfg->m_DrcDialog.severities; m_severities = cfg->m_DrcDialog.severities;

View File

@ -210,6 +210,7 @@ bool DRC_TEST_PROVIDER_LVS::Run()
{ {
reportPhase( _( "Layout-vs-Schematic checks..." )); reportPhase( _( "Layout-vs-Schematic checks..." ));
if( m_drcEngine->GetSchematicNetlist() )
testFootprints( *m_drcEngine->GetSchematicNetlist() ); testFootprints( *m_drcEngine->GetSchematicNetlist() );
reportRuleStatistics(); reportRuleStatistics();