Browse Source

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
pull/5/merge
Wayne Stambaugh 8 years ago
parent
commit
8b2b1381c4
  1. 5
      eeschema/dialogs/dialog_sym_lib_table.cpp
  2. 2
      eeschema/sch_io_mgr.cpp
  3. 2
      eeschema/sch_io_mgr.h
  4. 2
      eeschema/symbol_lib_table.cpp
  5. 2
      eeschema/symbol_lib_table.h

5
eeschema/dialogs/dialog_sym_lib_table.cpp

@ -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 );
}
}

2
eeschema/sch_io_mgr.cpp

@ -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;

2
eeschema/sch_io_mgr.h

@ -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.

2
eeschema/symbol_lib_table.cpp

@ -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;
}

2
eeschema/symbol_lib_table.h

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

Loading…
Cancel
Save