Browse Source

Symbol Fields Table: don't leave Qty editable on error

7.0
Mike Williams 3 years ago
parent
commit
ab954456ee
  1. 10
      eeschema/dialogs/dialog_symbol_fields_table.cpp

10
eeschema/dialogs/dialog_symbol_fields_table.cpp

@ -1056,11 +1056,6 @@ void DIALOG_SYMBOL_FIELDS_TABLE::LoadFieldNames()
void DIALOG_SYMBOL_FIELDS_TABLE::OnAddField( wxCommandEvent& event )
{
// quantities column will become new field column, so it needs to be reset
wxGridCellAttr* attr = new wxGridCellAttr;
m_grid->SetColAttr( m_dataModel->GetColsCount() - 1, attr );
m_grid->SetColFormatCustom( m_dataModel->GetColsCount() - 1, wxGRID_VALUE_STRING );
wxTextEntryDialog dlg( this, _( "New field name:" ), _( "Add Field" ) );
if( dlg.ShowModal() != wxID_OK )
@ -1084,6 +1079,11 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnAddField( wxCommandEvent& event )
}
}
// quantities column will become new field column, so it needs to be reset
wxGridCellAttr* attr = new wxGridCellAttr;
m_grid->SetColAttr( m_dataModel->GetColsCount() - 1, attr );
m_grid->SetColFormatCustom( m_dataModel->GetColsCount() - 1, wxGRID_VALUE_STRING );
std::string key( fieldName.ToUTF8() );
EESCHEMA_SETTINGS* cfg = static_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );

Loading…
Cancel
Save