mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Remove double-assert.
(getPropertyFromEvent() already asserts if it can't find one.)
This commit is contained in:
parent
3ec557cf4a
commit
fc0bcdc8a3
@ -159,15 +159,16 @@ void SCH_PROPERTIES_PANEL::valueChanging( wxPropertyGridEvent& aEvent )
|
||||
|
||||
SCH_SELECTION_TOOL* selectionTool = m_frame->GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
|
||||
const SELECTION& selection = selectionTool->GetSelection();
|
||||
EDA_ITEM* item = selection.Front();
|
||||
EDA_ITEM* frontItem = selection.Front();
|
||||
|
||||
PROPERTY_BASE* property = getPropertyFromEvent( aEvent );
|
||||
wxCHECK( property, /* void */ );
|
||||
wxCHECK( item, /* void */ );
|
||||
if( !frontItem )
|
||||
return;
|
||||
|
||||
if( PROPERTY_BASE* property = getPropertyFromEvent( aEvent ) )
|
||||
{
|
||||
wxVariant newValue = aEvent.GetPropertyValue();
|
||||
|
||||
if( VALIDATOR_RESULT validationFailure = property->Validate( newValue.GetAny(), item ) )
|
||||
if( VALIDATOR_RESULT validationFailure = property->Validate( newValue.GetAny(), frontItem ) )
|
||||
{
|
||||
wxString errorMsg = wxString::Format( wxS( "%s: %s" ), wxGetTranslation( property->Name() ),
|
||||
validationFailure->get()->Format( m_frame ) );
|
||||
@ -178,6 +179,7 @@ void SCH_PROPERTIES_PANEL::valueChanging( wxPropertyGridEvent& aEvent )
|
||||
|
||||
aEvent.Skip();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SCH_PROPERTIES_PANEL::valueChanged( wxPropertyGridEvent& aEvent )
|
||||
|
Loading…
x
Reference in New Issue
Block a user