]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/image.cpp
Fixed interface typo breaking wxRibbonBar docs (from r72495).
[wxWidgets.git] / src / common / image.cpp
index 5d65ecaa9cb44c186100eaf6ce1af0111104b39c..2c61998e6d3c226b9822dcd4750d60a75f2b61a9 100644 (file)
@@ -2306,7 +2306,10 @@ static wxImage LoadImageFromResource(const wxString &name, wxBitmapType type)
         image.SetMaskColour(0xc0, 0xc0, 0xc0);
     }
 
-    image.InitAlpha();
+    // We could have already loaded alpha from the resources, but if not,
+    // initialize it now using the mask.
+    if ( !image.HasAlpha() )
+        image.InitAlpha();
 
     return image;
 }