fixed a canonical example of Stupid Bug(tm)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-08-25 19:51:55 +00:00
parent 519dc37faf
commit a42aa5d7be
2 changed files with 4 additions and 4 deletions

View File

@@ -101,8 +101,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
{ {
wxObject *created = CreateResFromNode(n, toolbar, NULL); wxObject *created = CreateResFromNode(n, toolbar, NULL);
wxControl *control = wxDynamicCast(created, wxControl); wxControl *control = wxDynamicCast(created, wxControl);
if (IsOfClass(n, wxT("tool")) && if (!IsOfClass(n, wxT("tool")) &&
IsOfClass(n, wxT("separator")) && !IsOfClass(n, wxT("separator")) &&
control != NULL) control != NULL)
toolbar->AddControl(control); toolbar->AddControl(control);
} }

View File

@@ -101,8 +101,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
{ {
wxObject *created = CreateResFromNode(n, toolbar, NULL); wxObject *created = CreateResFromNode(n, toolbar, NULL);
wxControl *control = wxDynamicCast(created, wxControl); wxControl *control = wxDynamicCast(created, wxControl);
if (IsOfClass(n, wxT("tool")) && if (!IsOfClass(n, wxT("tool")) &&
IsOfClass(n, wxT("separator")) && !IsOfClass(n, wxT("separator")) &&
control != NULL) control != NULL)
toolbar->AddControl(control); toolbar->AddControl(control);
} }