Grégory Soutadé
fc0159fbc5
* Use GetLastRowId instead of doing another SQL request * Handle request failling * Fix a bug, wxGridCellFastBoolEditor crashes when deleted
25 lines
514 B
C++
25 lines
514 B
C++
#ifndef WXGRIDCELLFASTBOOLEDITOR_H
|
|
#define WXGRIDCELLFASTBOOLEDITOR_H
|
|
|
|
#include <wx/wx.h>
|
|
#include <wx/grid.h>
|
|
|
|
// From http://wiki.wxwidgets.org/WxGrid
|
|
class wxGridCellFastBoolEditor : public wxGridCellBoolEditor
|
|
{
|
|
public:
|
|
|
|
void BeginEdit (int row, int col, wxGrid* grid)
|
|
{
|
|
wxGridCellBoolEditor::BeginEdit(row, col, grid);
|
|
|
|
wxFocusEvent event (wxEVT_KILL_FOCUS);
|
|
if (m_control)
|
|
{
|
|
m_control->GetEventHandler()->AddPendingEvent(event);
|
|
}
|
|
}
|
|
};
|
|
|
|
#endif
|