X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3baef911e4d54307178d6ad4353a4b6ab57a69e4..d90443b8a2099cf0e8e5fec31571d0ba1c0818a9:/src/common/valgen.cpp diff --git a/src/common/valgen.cpp b/src/common/valgen.cpp index e38f6789bd..47f6f230d6 100644 --- a/src/common/valgen.cpp +++ b/src/common/valgen.cpp @@ -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; @@ -370,7 +370,8 @@ bool wxGenericValidator::TransferToWindow(void) } } else #endif - ; // to match the last 'else' above + { // to match the last 'else' above + } // unrecognized control, or bad pointer return false; @@ -415,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 ***************************************