Re-use ERC's delete-exclusions-query dialog for DRC.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16914
This commit is contained in:
parent
4c61a79e47
commit
91e15634fc
|
@ -1086,17 +1086,17 @@ void DIALOG_DRC::OnDeleteAllClick( wxCommandEvent& aEvent )
|
||||||
|
|
||||||
if( numExcluded > 0 )
|
if( numExcluded > 0 )
|
||||||
{
|
{
|
||||||
wxRichMessageDialog dlg( this, _( "Do you wish to delete excluded markers as well?" ),
|
wxMessageDialog dlg( this, _( "Delete exclusions too?" ), _( "Delete All Markers" ),
|
||||||
_( "Delete All Markers" ),
|
wxYES_NO | wxCANCEL | wxCENTER | wxICON_QUESTION );
|
||||||
wxOK | wxCANCEL | wxCENTER | wxICON_QUESTION );
|
dlg.SetYesNoLabels( _( "Errors and Warnings Only" ),
|
||||||
dlg.ShowCheckBox( _( "Delete exclusions" ), s_includeExclusions );
|
_( "Errors, Warnings and Exclusions" ) );
|
||||||
|
|
||||||
int ret = dlg.ShowModal();
|
int ret = dlg.ShowModal();
|
||||||
|
|
||||||
if( ret == wxID_CANCEL )
|
if( ret == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
else
|
else if( ret == wxID_NO )
|
||||||
s_includeExclusions = dlg.IsCheckBoxChecked();
|
s_includeExclusions = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteAllMarkers( s_includeExclusions );
|
deleteAllMarkers( s_includeExclusions );
|
||||||
|
|
Loading…
Reference in New Issue