Disable alternate pin assignments for DeMorgan

Instead of hiding the dialog, we diable the pane and dropdown with a
consistent tooltip explaining why the pin assignments are not available.
This commit is contained in:
Seth Hillbrand 2021-01-04 15:56:50 -08:00
parent d24b034cbc
commit 87d5318187
2 changed files with 11 additions and 1 deletions

View File

@ -181,6 +181,14 @@ DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, LIB_PIN
m_alternatesGrid->SetTable( m_alternatesDataModel );
m_alternatesGrid->PushEventHandler( new GRID_TRICKS( m_alternatesGrid ) );
if( aPin->GetParent()->HasConversion() )
{
m_alternatesTurndown->Collapse();
m_alternatesTurndown->Disable();
m_alternatesTurndown->SetToolTip(
_( "Alternate pin assignments are not available for DeMorgan components." ) );
}
// Set special attributes
wxGridCellAttr* attr;

View File

@ -326,7 +326,9 @@ DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES( SCH_EDIT_FRAME* aParent,
// DeMorgan conversions are a subclass of alternate pin assignments, so don't allow
// free-form alternate assignments as well. (We won't know how to map the alternates
// back and forth when the conversion is changed.)
m_notebook1->RemovePage( 1 );
m_pinTablePage->Disable();
m_pinTablePage->SetToolTip(
_( "Alternate pin assignments are not available for DeMorgan components." ) );
}
else
{