Fix the crash issue when select filament in per-object editting
Change-Id: I02be1b93f3b6df22843ac33ae565167711ffaf4a
This commit is contained in:
parent
b575e21ae1
commit
61c95431eb
|
@ -236,6 +236,25 @@ void GridCellFilamentsEditor::BeginEdit(int row, int col, wxGrid* grid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GridCellFilamentsEditor::EndEdit(int WXUNUSED(row),
|
||||||
|
int WXUNUSED(col),
|
||||||
|
const wxGrid* WXUNUSED(grid),
|
||||||
|
const wxString& WXUNUSED(oldval),
|
||||||
|
wxString *newval)
|
||||||
|
{
|
||||||
|
const wxString value = Combo()->GetValue();
|
||||||
|
if ( value == m_value )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
m_value = value;
|
||||||
|
|
||||||
|
if ( newval )
|
||||||
|
*newval = value;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
wxGridActivationResult GridCellFilamentsEditor::TryActivate(int row, int col, wxGrid* grid, const wxGridActivationSource& actSource)
|
wxGridActivationResult GridCellFilamentsEditor::TryActivate(int row, int col, wxGrid* grid, const wxGridActivationSource& actSource)
|
||||||
{
|
{
|
||||||
ObjectGridTable *table = dynamic_cast<ObjectGridTable *>(grid->GetTable());
|
ObjectGridTable *table = dynamic_cast<ObjectGridTable *>(grid->GetTable());
|
||||||
|
|
|
@ -71,6 +71,8 @@ public:
|
||||||
virtual wxGridCellEditor *Clone() const wxOVERRIDE;
|
virtual wxGridCellEditor *Clone() const wxOVERRIDE;
|
||||||
|
|
||||||
virtual void BeginEdit(int row, int col, wxGrid* grid) wxOVERRIDE;
|
virtual void BeginEdit(int row, int col, wxGrid* grid) wxOVERRIDE;
|
||||||
|
virtual bool EndEdit(int row, int col, const wxGrid* grid,
|
||||||
|
const wxString& oldval, wxString *newval) wxOVERRIDE;
|
||||||
|
|
||||||
virtual wxGridActivationResult TryActivate(int row, int col, wxGrid* grid, const wxGridActivationSource& actSource) wxOVERRIDE;
|
virtual wxGridActivationResult TryActivate(int row, int col, wxGrid* grid, const wxGridActivationSource& actSource) wxOVERRIDE;
|
||||||
virtual void DoActivate(int row, int col, wxGrid* grid) wxOVERRIDE;
|
virtual void DoActivate(int row, int col, wxGrid* grid) wxOVERRIDE;
|
||||||
|
|
Loading…
Reference in New Issue