Browse Source

Fix issue with severities not get initialised in DRC_TREE_MODELs.

pull/16/head
Jeff Young 6 years ago
parent
commit
d20f36511f
  1. 4
      pcbnew/dialogs/dialog_drc.cpp
  2. 8
      pcbnew/drc/drc_tree_model.cpp

4
pcbnew/dialogs/dialog_drc.cpp

@ -147,7 +147,11 @@ void DIALOG_DRC_CONTROL::initValues()
m_cbRefillZones->SetValue( cfg->m_DrcDialog.refill_zones );
m_cbReportAllTrackErrors->SetValue( cfg->m_DrcDialog.test_track_to_zone );
m_cbTestFootprints->SetValue( cfg->m_DrcDialog.test_footprints );
m_severities = cfg->m_DrcDialog.severities;
m_markerTreeModel->SetSeverities( m_severities );
m_unconnectedTreeModel->SetSeverities( m_severities );
m_footprintWarningsTreeModel->SetSeverities( m_severities );
Layout(); // adding the units above expanded Clearance text, now resize.

8
pcbnew/drc/drc_tree_model.cpp

@ -82,7 +82,8 @@ void DRC_TREE_MODEL::rebuildModel( DRC_ITEMS_PROVIDER* aProvider, int aSeveritie
// Even with the updateLock, wxWidgets sometimes ties its knickers in
// a knot when trying to run a wxdataview_selection_changed_callback()
// on a row that has been deleted.
m_view->UnselectAll();
if( m_view )
m_view->UnselectAll();
Cleared();
@ -92,12 +93,11 @@ void DRC_TREE_MODEL::rebuildModel( DRC_ITEMS_PROVIDER* aProvider, int aSeveritie
m_drcItemsProvider = aProvider;
}
wxASSERT( m_drcItemsProvider );
if( aSeverities != m_severities )
m_severities = aSeverities;
m_drcItemsProvider->SetSeverities( m_severities );
if( m_drcItemsProvider )
m_drcItemsProvider->SetSeverities( m_severities );
m_tree.clear();

Loading…
Cancel
Save