Close active cell editor when showing/hiding columns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17425
This commit is contained in:
parent
bd59fb7768
commit
f3ce3bc758
|
@ -445,7 +445,7 @@ void GRID_TRICKS::doPopupSelection( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
default:
|
||||
if( menu_id >= GRIDTRICKS_FIRST_SHOWHIDE )
|
||||
if( menu_id >= GRIDTRICKS_FIRST_SHOWHIDE && m_grid->CommitPendingChanges( false ) )
|
||||
{
|
||||
int col = menu_id - GRIDTRICKS_FIRST_SHOWHIDE;
|
||||
|
||||
|
|
|
@ -146,13 +146,17 @@ protected:
|
|||
{
|
||||
if( m_fieldsCtrl->GetTextValue( row, FIELD_NAME_COLUMN ) == fieldName )
|
||||
{
|
||||
m_fieldsCtrl->SetToggleValue( show, row, SHOW_FIELD_COLUMN );
|
||||
if( m_grid->CommitPendingChanges( false ) )
|
||||
m_fieldsCtrl->SetToggleValue( show, row, SHOW_FIELD_COLUMN );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GRID_TRICKS::doPopupSelection( event );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue