From 8b2b1381c4030a1704bd1db05ed7ef50f84d0eaf Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sun, 19 Nov 2017 16:53:31 -0500 Subject: [PATCH] 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 --- eeschema/dialogs/dialog_sym_lib_table.cpp | 5 ++--- eeschema/sch_io_mgr.cpp | 2 -- eeschema/sch_io_mgr.h | 2 +- eeschema/symbol_lib_table.cpp | 2 +- eeschema/symbol_lib_table.h | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/eeschema/dialogs/dialog_sym_lib_table.cpp b/eeschema/dialogs/dialog_sym_lib_table.cpp index a30e56ee94..1fa429dc41 100644 --- a/eeschema/dialogs/dialog_sym_lib_table.cpp +++ b/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 ); } } diff --git a/eeschema/sch_io_mgr.cpp b/eeschema/sch_io_mgr.cpp index ce98084771..f17791f502 100644 --- a/eeschema/sch_io_mgr.cpp +++ b/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; diff --git a/eeschema/sch_io_mgr.h b/eeschema/sch_io_mgr.h index 8818edf298..23c6ef073d 100644 --- a/eeschema/sch_io_mgr.h +++ b/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. diff --git a/eeschema/symbol_lib_table.cpp b/eeschema/symbol_lib_table.cpp index 1019310378..2a573f827b 100644 --- a/eeschema/symbol_lib_table.cpp +++ b/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; } diff --git a/eeschema/symbol_lib_table.h b/eeschema/symbol_lib_table.h index 63cfe6cc55..1d811c1b19 100644 --- a/eeschema/symbol_lib_table.h +++ b/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 ) { }