Safer way to commit in-progress changes in wxGrid.
In some cases the wxGrid would attempt to close the editor in the middle of the d'tor, resulting in segfaults.
This commit is contained in:
parent
5e34563f52
commit
1a845bc4ad
|
@ -550,8 +550,8 @@ void DIALOG_SYMBOL_LIB_TABLE::moveDownHandler( wxCommandEvent& event )
|
|||
|
||||
bool DIALOG_SYMBOL_LIB_TABLE::TransferDataFromWindow()
|
||||
{
|
||||
// stuff any pending cell editor text into the table.
|
||||
m_cur_grid->SaveEditControlValue();
|
||||
// Commit any pending in-place edits and close the editor
|
||||
m_cur_grid->DisableCellEditControl();
|
||||
|
||||
if( !wxDialog::TransferDataFromWindow() || !verifyTables() )
|
||||
return false;
|
||||
|
|
|
@ -582,7 +582,7 @@ private:
|
|||
int dialogRet = 0;
|
||||
|
||||
// stuff any pending cell editor text into the table.
|
||||
m_cur_grid->SaveEditControlValue();
|
||||
m_cur_grid->DisableCellEditControl();
|
||||
|
||||
if( verifyTables() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue