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)
|
||||
{
|
||||
ObjectGridTable *table = dynamic_cast<ObjectGridTable *>(grid->GetTable());
|
||||
|
@ -2365,7 +2384,7 @@ ObjectTablePanel::ObjectTablePanel( wxWindow* parent, wxWindowID id, const wxPoi
|
|||
SetSize(wxSize(-1, FromDIP(450)));
|
||||
SetMinSize(wxSize(-1, FromDIP(450)));
|
||||
SetMaxSize(wxSize(-1, FromDIP(450)));
|
||||
|
||||
|
||||
//m_search_line = new wxTextCtrl(this, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
|
||||
|
||||
init_bitmap();
|
||||
|
@ -2401,7 +2420,7 @@ ObjectTablePanel::ObjectTablePanel( wxWindow* parent, wxWindowID id, const wxPoi
|
|||
m_page_top_sizer->Add(m_page_text, 0, wxEXPAND, 5);*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//TODO, adjust later
|
||||
/*
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
const wxRect& rect,
|
||||
int row, int col,
|
||||
bool isSelected) wxOVERRIDE;
|
||||
|
||||
|
||||
virtual wxSize GetBestSize(wxGrid& WXUNUSED(grid),
|
||||
wxGridCellAttr& attr,
|
||||
wxDC& dc,
|
||||
|
@ -71,6 +71,8 @@ public:
|
|||
virtual wxGridCellEditor *Clone() const 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 void DoActivate(int row, int col, wxGrid* grid) wxOVERRIDE;
|
||||
|
@ -151,7 +153,7 @@ public:
|
|||
//ObjectGrid for the param setting table
|
||||
class ObjectGrid : public wxGrid
|
||||
{
|
||||
public:
|
||||
public:
|
||||
ObjectGrid(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
|
@ -377,7 +379,7 @@ public:
|
|||
virtual int GetNumberRows() wxOVERRIDE;
|
||||
virtual int GetNumberCols() wxOVERRIDE;
|
||||
virtual bool IsEmptyCell( int row, int col ) wxOVERRIDE;
|
||||
|
||||
|
||||
|
||||
//virtual wxString GetColLabelValue( int col ) wxOVERRIDE;
|
||||
|
||||
|
@ -537,7 +539,7 @@ private:
|
|||
|
||||
wxFloatingPointValidator<float> m_float_validator;
|
||||
wxBitmap m_undo_bitmap;
|
||||
std::vector<wxBitmap*> m_color_bitmaps;
|
||||
std::vector<wxBitmap*> m_color_bitmaps;
|
||||
ScalableBitmap m_bmp_reset;
|
||||
ScalableBitmap m_bmp_reset_disable;
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue