]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/resource.cpp
::bindInsertParams() was leaving some column bindings uninitialized if the column...
[wxWidgets.git] / src / common / resource.cpp
index cd930265e039c8438845ed9e4079cd11af4262e7..c32447bfa775e8c9f4987fe6c2c265d244add3b1 100644 (file)
@@ -347,7 +347,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
    else if (itemType == wxString(wxT("wxMessage")) || itemType == wxString(wxT("wxStaticText")) ||
          itemType == wxString(wxT("wxStaticBitmap")))
       {
-        if (childResource->GetValue4() != wxT(""))
+        if (childResource->GetValue4() != wxT("") || itemType == wxString(wxT("wxStaticBitmap")) )
         {
           // Bitmap message
           wxBitmap bitmap = childResource->GetBitmap();
@@ -357,6 +357,12 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
             ((wxItemResource*) childResource)->SetBitmap(bitmap);
           }
 #if wxUSE_BITMAP_MESSAGE
+#ifdef __WXMSW__
+          // Use a default bitmap
+          if (!bitmap.Ok())
+             bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE);
+#endif
+
           if (bitmap.Ok())
            control = new wxStaticBitmap(parent, id, bitmap, pos, size,
              childResource->GetStyle(), childResource->GetName());
@@ -902,11 +908,11 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
 
       if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
      {
-        // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count)));
-       // Do nothing - no label font any more
-      count ++;
-        if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
-          controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
+       // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count)));
+       // Skip past the obsolete label font spec if there are two consecutive specs
+       if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList)
+         count ++;
+       controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
      }
    }
   }