Return proper value from wxIAccessible::get_accSelection() if no children are selected
VT_EMPTY VARIANT should be returned if wxAccessible::GetSelections() returns empty list of selected children.
This commit is contained in:
@@ -1503,7 +1503,13 @@ STDMETHODIMP wxIAccessible::get_accSelection ( VARIANT * pVarChildren)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (selections.GetType() == wxT("long"))
|
||||
if ( selections.IsNull() )
|
||||
{
|
||||
pVarChildren->vt = VT_EMPTY;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
else if (selections.GetType() == wxT("long"))
|
||||
{
|
||||
pVarChildren->vt = VT_I4;
|
||||
pVarChildren->lVal = selections.GetLong();
|
||||
@@ -1526,6 +1532,8 @@ STDMETHODIMP wxIAccessible::get_accSelection ( VARIANT * pVarChildren)
|
||||
}
|
||||
else if (selections.GetType() == wxT("list"))
|
||||
{
|
||||
wxASSERT_MSG( selections.GetCount() > 1,
|
||||
wxS("Multiple child objects should be selected") );
|
||||
// TODO: should we AddRef for every "void*" member??
|
||||
|
||||
wxIEnumVARIANT* enumVariant = new wxIEnumVARIANT(selections);
|
||||
|
Reference in New Issue
Block a user