Symbol Fields Table: check against data model col for grouping
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14870
This commit is contained in:
parent
bb6555ff36
commit
039f23eba8
|
@ -775,8 +775,10 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnColumnItemToggled( wxDataViewEvent& event )
|
||||||
case GROUP_BY_COLUMN:
|
case GROUP_BY_COLUMN:
|
||||||
{
|
{
|
||||||
bool value = m_fieldsCtrl->GetToggleValue( row, col );
|
bool value = m_fieldsCtrl->GetToggleValue( row, col );
|
||||||
|
int dataCol = m_dataModel->GetFieldNameCol(
|
||||||
|
m_fieldsCtrl->GetTextValue( row, FIELD_NAME_COLUMN ) );
|
||||||
|
|
||||||
if( m_dataModel->ColIsQuantity( row ) && value )
|
if( m_dataModel->ColIsQuantity( dataCol ) && value )
|
||||||
{
|
{
|
||||||
DisplayError( this, _( "The Quantity column cannot be grouped by." ) );
|
DisplayError( this, _( "The Quantity column cannot be grouped by." ) );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue