Symbol Fields Table: don't leave Qty editable on error
This commit is contained in:
parent
4c18dfebb9
commit
ab954456ee
|
@ -1056,11 +1056,6 @@ void DIALOG_SYMBOL_FIELDS_TABLE::LoadFieldNames()
|
||||||
|
|
||||||
void DIALOG_SYMBOL_FIELDS_TABLE::OnAddField( wxCommandEvent& event )
|
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" ) );
|
wxTextEntryDialog dlg( this, _( "New field name:" ), _( "Add Field" ) );
|
||||||
|
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
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() );
|
std::string key( fieldName.ToUTF8() );
|
||||||
|
|
||||||
EESCHEMA_SETTINGS* cfg = static_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
|
EESCHEMA_SETTINGS* cfg = static_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
|
||||||
|
|
Loading…
Reference in New Issue