diff --git a/common/rc_item.cpp b/common/rc_item.cpp index 5ac85b83bf..7248186009 100644 --- a/common/rc_item.cpp +++ b/common/rc_item.cpp @@ -379,7 +379,7 @@ void RC_TREE_MODEL::ValueChanged( RC_TREE_NODE* aNode ) { wxDataViewModel::ValueChanged( ToItem( aNode ), 0 ); - for( auto & child : aNode->m_Children ) + for( RC_TREE_NODE* child : aNode->m_Children ) wxDataViewModel::ValueChanged( ToItem( child ), 0 ); } } @@ -387,7 +387,7 @@ void RC_TREE_MODEL::ValueChanged( RC_TREE_NODE* aNode ) void RC_TREE_MODEL::DeleteCurrentItem( bool aDeep ) { - DeleteItems( true, false, aDeep ); + DeleteItems( true, true, aDeep ); } @@ -434,9 +434,6 @@ void RC_TREE_MODEL::DeleteItems( bool aCurrentOnly, bool aIncludeExclusions, boo // Only deep delete the current item here; others will be done through the // DeleteAllItems() call below, which is more efficient. m_rcItemsProvider->DeleteItem( i, aDeep && aCurrentOnly ); - - if( aCurrentOnly ) - break; } if( !aCurrentOnly ) diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index 9e74b8e4f5..65cb44fcce 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -607,15 +607,16 @@ void DIALOG_DRC::OnDeleteAllClick( wxCommandEvent& aEvent ) if( numExcluded > 0 ) { - wxMessageDialog dlg( this, _( "Delete exclusions too?" ), _( "Delete All Markers" ), - wxYES_NO | wxCANCEL | wxCENTER | wxICON_QUESTION ); - dlg.SetYesNoLabels( _( "Errors and Warnings Only" ) , _( "Errors, Warnings and Exclusions" ) ); + wxRichMessageDialog dlg( this, _( "Do you wish to delete excluded markers as well?" ), + _( "Delete All Markers" ), + wxOK | wxCANCEL | wxCENTER | wxICON_QUESTION ); + dlg.ShowCheckBox( _( "Delete exclusions" ) ); int ret = dlg.ShowModal(); if( ret == wxID_CANCEL ) return; - else if( ret == wxID_NO ) + else if( dlg.IsCheckBoxChecked() ) includeExclusions = true; }