]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_stbmp.cpp
removed assert which became incorrect after last change
[wxWidgets.git] / src / xrc / xh_stbmp.cpp
index 544b43de9f6dda2a2a5c4d0fea2251a4d7681bf2..04eb5096df7c3228b36d60b1d082f97e2f8fb707 100644 (file)
@@ -22,6 +22,8 @@
 #include "wx/xrc/xh_stbmp.h"
 #include "wx/statbmp.h"
 
 #include "wx/xrc/xh_stbmp.h"
 #include "wx/statbmp.h"
 
+IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmapXmlHandler, wxXmlResourceHandler)
+
 wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() 
 : wxXmlResourceHandler() 
 {
 wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() 
 : wxXmlResourceHandler() 
 {
@@ -30,14 +32,11 @@ wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler()
 
 wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
 { 
 
 wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
 { 
-    wxStaticBitmap *bmp = wxStaticCast(m_instance, wxStaticBitmap);
-
-    if (!bmp)
-       bmp = new wxStaticBitmap;
+    XRC_MAKE_INSTANCE(bmp, wxStaticBitmap)
 
     bmp->Create(m_parentAsWindow,
                 GetID(),
 
     bmp->Create(m_parentAsWindow,
                 GetID(),
-                GetBitmap(wxT("bitmap"), GetSize()),
+                GetBitmap(wxT("bitmap"), wxART_OTHER, GetSize()),
                 GetPosition(), GetSize(),
                 GetStyle(),
                 GetName());
                 GetPosition(), GetSize(),
                 GetStyle(),
                 GetName());
@@ -47,11 +46,7 @@ wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
     return bmp;
 }
 
     return bmp;
 }
 
-
-
 bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxStaticBitmap"));
 }
 bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxStaticBitmap"));
 }
-
-