]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/valgen.cpp
Committing modified version of jwiesemann's patch (see #11223):
[wxWidgets.git] / src / common / valgen.cpp
index 37cefb5e74435debbe15ef6b5e633e0427c05140..47f6f230d6bbfaa00067c3c76ff850714b94daee 100644 (file)
@@ -146,7 +146,7 @@ bool wxGenericValidator::TransferToWindow(void)
             return true;
         }
     } else
-#if defined(__WXMAC__) || defined(__WXGTK20__)
+#if (defined(__WXMAC__) || defined(__WXMSW__) || defined(__WXGTK20__)) && !defined(__WXUNIVERSAL__)
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxBitmapToggleButton)) )
     {
         wxBitmapToggleButton * pControl = (wxBitmapToggleButton *) m_validatorWindow;
@@ -416,6 +416,17 @@ bool wxGenericValidator::TransferFromWindow(void)
             return true;
         }
     } else
+#if (defined(__WXMAC__) || defined(__WXMSW__) || defined(__WXGTK20__)) && !defined(__WXUNIVERSAL__)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxBitmapToggleButton)) )
+    {
+        wxBitmapToggleButton *pControl = (wxBitmapToggleButton *) m_validatorWindow;
+        if (m_pBool)
+        {
+            *m_pBool = pControl->GetValue() ;
+            return true;
+        }
+    } else
+#endif
 #endif
 
     // INT CONTROLS ***************************************