return radio box own help text when origin is Origin_Unknown to make sure GetHelpText() returns the same value as was passed to SetHelpText()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
dd17c9c6f1
commit
6eb872ea53
@ -271,9 +271,26 @@ wxString wxRadioBoxBase::DoGetHelpTextAtPoint(const wxWindow *derived,
|
||||
const wxPoint& pt,
|
||||
wxHelpEvent::Origin origin) const
|
||||
{
|
||||
const int item = origin == wxHelpEvent::Origin_HelpButton
|
||||
? GetItemFromPoint(pt)
|
||||
: GetSelection();
|
||||
int item;
|
||||
switch ( origin )
|
||||
{
|
||||
case wxHelpEvent::Origin_HelpButton:
|
||||
item = GetItemFromPoint(pt);
|
||||
break;
|
||||
|
||||
case wxHelpEvent::Origin_Keyboard:
|
||||
item = GetSelection();
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "unknown help even origin" );
|
||||
// fall through
|
||||
|
||||
case wxHelpEvent::Origin_Unknown:
|
||||
// this value is used when we're called from GetHelpText() for the
|
||||
// radio box itself, so don't return item-specific text in this case
|
||||
item = wxNOT_FOUND;
|
||||
}
|
||||
|
||||
if ( item != wxNOT_FOUND )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user