From bb7d55e5a408c3dbb09ed934c8be341d219f72ab Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Thu, 9 Mar 2023 08:29:14 -0500 Subject: [PATCH] Symbol Fields Table: fix Qty column Really need to refactor these strings out of everything... --- eeschema/dialogs/dialog_symbol_fields_table.cpp | 4 ++-- eeschema/fields_data_model.cpp | 2 +- eeschema/fields_data_model.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eeschema/dialogs/dialog_symbol_fields_table.cpp b/eeschema/dialogs/dialog_symbol_fields_table.cpp index 7387fedf1f..a7d75cb03c 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table.cpp @@ -341,7 +341,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::SetupColumnProperties() attr->SetEditor( new GRID_CELL_URL_EDITOR( this, Prj().SchSearchS() ) ); m_grid->SetColAttr( col, attr ); } - else if( m_dataModel->GetColFieldName( col ) == _( "Qty" ) ) + else if( m_dataModel->GetColFieldName( col ) == _( "Quantity" ) ) { attr->SetReadOnly(); m_grid->SetColAttr( col, attr ); @@ -540,7 +540,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::LoadFieldNames() AddField( _( "Value" ), wxT( "Value" ), true, true ); AddField( _( "Footprint" ), wxT( "Footprint" ), true, true ); AddField( _( "Datasheet" ), wxT( "Datasheet" ), true, false ); - AddField( _( "Quantity" ), wxT( "Qty" ), true, false ); + AddField( _( "Quantity" ), wxT( "Qty" ), true, false ); for( const wxString& fieldName : userFieldNames ) AddField( fieldName, fieldName, true, false ); diff --git a/eeschema/fields_data_model.cpp b/eeschema/fields_data_model.cpp index 218b06fc26..d32cb10f36 100644 --- a/eeschema/fields_data_model.cpp +++ b/eeschema/fields_data_model.cpp @@ -492,7 +492,7 @@ void FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData() for( const std::pair srcData : fieldStore ) { - if( srcData.first == _( "Qty" ) ) + if( srcData.first == _( "Quantity" ) ) continue; const wxString& srcName = srcData.first; diff --git a/eeschema/fields_data_model.h b/eeschema/fields_data_model.h index 598396370e..0fb35260ce 100644 --- a/eeschema/fields_data_model.h +++ b/eeschema/fields_data_model.h @@ -128,7 +128,7 @@ public: bool ColIsQuantity( int aCol ) { wxCHECK( aCol >= 0 && aCol < (int) m_cols.size(), false ); - return m_cols[aCol].m_fieldName == _( "Qty" ); + return m_cols[aCol].m_fieldName == _( "Quantity" ); } void SetSorting( int aCol, bool ascending )