don't call SetInsertionPointEnd() on a read-only combobox (patch 1828963)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1560,8 +1560,9 @@ void wxGridCellChoiceEditor::BeginEdit(int row, int col, wxGrid* grid)
|
|||||||
if (m_allowOthers)
|
if (m_allowOthers)
|
||||||
{
|
{
|
||||||
Combo()->SetValue(m_startValue);
|
Combo()->SetValue(m_startValue);
|
||||||
|
Combo()->SetInsertionPointEnd();
|
||||||
}
|
}
|
||||||
else
|
else // the combobox is read-only
|
||||||
{
|
{
|
||||||
// find the right position, or default to the first if not found
|
// find the right position, or default to the first if not found
|
||||||
int pos = Combo()->FindString(m_startValue);
|
int pos = Combo()->FindString(m_startValue);
|
||||||
@@ -1570,7 +1571,6 @@ void wxGridCellChoiceEditor::BeginEdit(int row, int col, wxGrid* grid)
|
|||||||
Combo()->SetSelection(pos);
|
Combo()->SetSelection(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Combo()->SetInsertionPointEnd();
|
|
||||||
Combo()->SetFocus();
|
Combo()->SetFocus();
|
||||||
|
|
||||||
if (evtHandler)
|
if (evtHandler)
|
||||||
|
Reference in New Issue
Block a user