X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c92ed9f7a72d7b8ead9cf19f0deb029c80f5f348..92dda0f7a31fdfeed083cd285b2900e6e9a83a0b:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 6e36f1d0fd..9ad4536bc8 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -668,7 +668,8 @@ bool wxGridCellTextEditor::EndEdit(int row, int col, grid->GetTable()->SetValue(row, col, value); m_startValue = wxEmptyString; - Text()->SetValue(m_startValue); + // No point in setting the text of the hidden control + //Text()->SetValue(m_startValue); return changed; } @@ -1397,20 +1398,11 @@ void wxGridCellChoiceEditor::Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) { - size_t count = m_choices.GetCount(); - wxString *choices = new wxString[count]; - for ( size_t n = 0; n < count; n++ ) - { - choices[n] = m_choices[n]; - } - m_control = new wxComboBox(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, - count, choices, + m_choices, m_allowOthers ? 0 : wxCB_READONLY); - delete [] choices; - wxGridCellEditor::Create(parent, id, evtHandler); } @@ -4240,9 +4232,9 @@ void wxGrid::CalcDimensions() GetViewStart( &x, &y ); // ensure the position is valid for the new scroll ranges - if ( x >= w ) + if ( x >= w ) x = wxMax( w - 1, 0 ); - if ( y >= h ) + if ( y >= h ) y = wxMax( h - 1, 0 ); // do set scrollbar parameters