Clean up wxOwnerDrawnComboBox XRC handler as suggested by abxabx fixing bug
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1487463&group_id=9863 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -106,14 +106,23 @@ wxObject *wxOwnerDrawnComboBoxXmlHandler::DoCreateResource()
|
|||||||
|
|
||||||
bool wxOwnerDrawnComboBoxXmlHandler::CanHandle(wxXmlNode *node)
|
bool wxOwnerDrawnComboBoxXmlHandler::CanHandle(wxXmlNode *node)
|
||||||
{
|
{
|
||||||
// Avoid GCC bug - this fails on certain GCC 3.x builds for an unknown reason
|
#if wxABI_VERSION >= 20700
|
||||||
// return (IsOfClass(node, wxT("wxOwnerDrawnComboBox")) ||
|
|
||||||
// (m_insideBox && node->GetName() == wxT("item")));
|
return (IsOfClass(node, wxT("wxOwnerDrawnComboBox")) ||
|
||||||
|
(m_insideBox && node->GetName() == wxT("item")));
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
// Avoid GCC bug - this fails on certain GCC 3.3 and 3.4 builds for an unknown reason
|
||||||
|
// it is believed to be related to the fact IsOfClass is inline, and node->GetPropVal
|
||||||
|
// gets passed an invalid "this" pointer. On 2.7, the function is out of line, so the
|
||||||
|
// above should work fine. This code is left in here so this file can easily be used
|
||||||
|
// in a version backported to 2.6. All we are doing here is expanding the macro
|
||||||
|
|
||||||
bool fOurClass = node->GetPropVal(wxT("class"), wxEmptyString) == wxT("wxOwnerDrawnComboBox");
|
bool fOurClass = node->GetPropVal(wxT("class"), wxEmptyString) == wxT("wxOwnerDrawnComboBox");
|
||||||
return (fOurClass ||
|
return (fOurClass ||
|
||||||
(m_insideBox && node->GetName() == wxT("item")));
|
(m_insideBox && node->GetName() == wxT("item")));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_XRC && wxUSE_ODCOMBOBOX
|
#endif // wxUSE_XRC && wxUSE_ODCOMBOBOX
|
||||||
|
Reference in New Issue
Block a user