]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/radiocmn.cpp
set icons bundle, not single icon, for frames loaded from XRC
[wxWidgets.git] / src / common / radiocmn.cpp
index c8234e282c1265653fafd7d2935b0d97ffed7445..f1fec65ad577df584d5e0eccf73c7a672c3b88aa 100644 (file)
@@ -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 )
     {