From 35a14b8e5d8fca7d3be21f64d542d99be058b351 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 9 Oct 2022 20:24:07 +0100 Subject: [PATCH] Better error messages (and make an empty pad an error, not a warning). --- pcbnew/dialogs/dialog_pad_properties.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index aa89f26d27..5396850db6 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -1256,12 +1256,12 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() else if( m_dummyPad->GetShape() == PAD_SHAPE::CIRCLE ) { if( pad_size.x <= 0 ) - warning_msgs.Add( _( "Warning: Pad size is less than zero." ) ); + error_msgs.Add( _( "Error: Pad must have a positive size." ) ); } else { if( pad_size.x <= 0 || pad_size.y <= 0 ) - warning_msgs.Add( _( "Warning: Pad size is less than zero." ) ); + error_msgs.Add( _( "Error: Pad must have a positive size." ) ); } // Test hole against pad shape @@ -1452,10 +1452,12 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() : _( "Pad Properties Warnings" ); HTML_MESSAGE_BOX dlg( this, title ); - dlg.ListSet( error_msgs ); + wxArrayString msgs = error_msgs; - if( warning_msgs.GetCount() ) - dlg.ListSet( warning_msgs ); + for( const wxString& msg : warning_msgs ) + msgs.Add( msg ); + + dlg.ListSet( msgs ); dlg.ShowModal(); }