From 6905cfb95bbbc05ccf572cc378d6fdf721b37474 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 3 Feb 2022 14:30:44 -0800 Subject: [PATCH] Update error message to match new arc dialog We now provide arc end points and interior angle, so we cannot check for null radius in the same fashion. Instead, the starpoint==endpoint indicates a zero radius Fixes https://gitlab.com/kicad/code/kicad/issues/10714 (cherry picked from commit ef94f31204048f44d2dddb409a3b8c27a87a564d) --- pcbnew/dialogs/dialog_graphic_item_properties.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pcbnew/dialogs/dialog_graphic_item_properties.cpp b/pcbnew/dialogs/dialog_graphic_item_properties.cpp index afa31ed606..f668a5e4bc 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties.cpp @@ -428,7 +428,10 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::Validate() if( m_angle.GetAngleValue() == ANGLE_0 ) error_msgs.Add( _( "The arc angle cannot be zero." ) ); - KI_FALLTHROUGH; + if( m_startX.GetValue() == m_endX.GetValue() && m_startY.GetValue() == m_endY.GetValue() ) + error_msgs.Add( _( "The radius cannot be zero." ) ); + + break; case SHAPE_T::CIRCLE: // Check radius.