Fix symbol library table editor plugin type selection bug.

Remove the placeholders for the upcoming s-expression schematic and
symbol library file format plugin type.  The lack of a valid plugin
implementation was causing an undefined plugin type string in the
plugin type selection cell when new rows were added to the table.

Fixes lp:1733116

https://bugs.launchpad.net/kicad/+bug/1733116
This commit is contained in:
Wayne Stambaugh 2017-11-19 16:53:31 -05:00
parent 33cf082c41
commit 8b2b1381c4
5 changed files with 5 additions and 8 deletions

View File

@ -165,7 +165,7 @@ DIALOG_SYMBOL_LIB_TABLE::DIALOG_SYMBOL_LIB_TABLE( wxTopLevelWindow* aParent,
wxArrayString pluginChoices;
pluginChoices.Add( SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_KICAD ) );
// pluginChoices.Add( SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_KICAD ) );
pluginChoices.Add( SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_LEGACY ) );
wxGridCellAttr* attr;
@ -399,8 +399,7 @@ void DIALOG_SYMBOL_LIB_TABLE::appendRowHandler( wxCommandEvent& event )
{
int row = m_cur_grid->GetNumberRows() - 1;
// Gives a default type (currently, only one type exists):
m_cur_grid->SetCellValue( row, COL_TYPE,
SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_LEGACY ) );
m_cur_grid->SetCellValue( row, COL_TYPE, SCH_IO_MGR::ShowType( SCH_IO_MGR::SCH_LEGACY ) );
scrollToRow( row );
}
}

View File

@ -57,8 +57,6 @@ SCH_PLUGIN* SCH_IO_MGR::FindPlugin( SCH_FILE_T aFileType )
return new SCH_LEGACY_PLUGIN();
case SCH_EAGLE:
return new SCH_EAGLE_PLUGIN();
case SCH_KICAD:
return NULL;
}
return NULL;

View File

@ -54,7 +54,7 @@ public:
DEFINE_ENUM_VECTOR( SCH_FILE_T,
{
SCH_LEGACY, ///< Legacy Eeschema file formats prior to s-expression.
SCH_KICAD, ///< The s-expression version of the schematic file formats.
// SCH_KICAD, ///< The s-expression version of the schematic file formats.
SCH_EAGLE, ///< Autodesk Eagle file format
// Add your schematic type here.

View File

@ -62,7 +62,7 @@ void SYMBOL_LIB_TABLE_ROW::SetType( const wxString& aType )
type = SCH_IO_MGR::EnumFromStr( aType );
if( SCH_IO_MGR::SCH_FILE_T( -1 ) == type )
type = SCH_IO_MGR::SCH_KICAD;
type = SCH_IO_MGR::SCH_LEGACY;
}

View File

@ -54,7 +54,7 @@ public:
}
SYMBOL_LIB_TABLE_ROW() :
type( SCH_IO_MGR::SCH_KICAD )
type( SCH_IO_MGR::SCH_LEGACY )
{
}