]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/resource.cpp
Fixed doubled-up key effects in wxTextCtrl by resetting m_lastMsg to 0
[wxWidgets.git] / src / common / resource.cpp
index fc9b8f507aa7ec50e7473989b9a46bde1d174010..ac44cbc88210254f9bdd79d59af48743ff515df7 100644 (file)
@@ -824,9 +824,13 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
     if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord)))
     {
         wxString str(expr->Nth(count)->StringValue());
     if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord)))
     {
         wxString str(expr->Nth(count)->StringValue());
-        controlItem->SetValue4(str);
         count ++;
         count ++;
-        controlItem->SetType("wxBitmapButton");
+
+        if (str != "")
+        {
+            controlItem->SetValue4(str);
+            controlItem->SetType("wxBitmapButton");
+        }
     }
     if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
       controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
     }
     if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
       controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
@@ -2173,7 +2177,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
                          "Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
           return wxNullBitmap;
         }
                          "Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
           return wxNullBitmap;
         }
-        return wxBitmap((const char **)item->GetValue1());
+        return wxBitmap((char **)item->GetValue1());
 #else
         wxLogWarning(_("No XPM facility available!"));
 #endif
 #else
         wxLogWarning(_("No XPM facility available!"));
 #endif