From f671f4db51bd18c25990ef595cfae973ff5e1bd7 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 9 Feb 2024 11:20:08 +0000 Subject: [PATCH] Re-use ERC's delete-exclusions-query dialog for DRC. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16914 (cherry picked from commit 91e15634fcc4f8ee0c1ab84fbf989c4d2bc17cfa) --- pcbnew/dialogs/dialog_drc.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index e4ecae5ed9..1047aa4eca 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -1139,17 +1139,17 @@ void DIALOG_DRC::OnDeleteAllClick( wxCommandEvent& aEvent ) if( numExcluded > 0 ) { - wxRichMessageDialog dlg( this, _( "Do you wish to delete excluded markers as well?" ), - _( "Delete All Markers" ), - wxOK | wxCANCEL | wxCENTER | wxICON_QUESTION ); - dlg.ShowCheckBox( _( "Delete exclusions" ), s_includeExclusions ); + 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" ) ); int ret = dlg.ShowModal(); if( ret == wxID_CANCEL ) return; - else - s_includeExclusions = dlg.IsCheckBoxChecked(); + else if( ret == wxID_NO ) + s_includeExclusions = true; } deleteAllMarkers( s_includeExclusions );