Add wxFS_SEEKABLE to wxFileSystem::OpenFile calls for images.
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Sat, 18 Nov 2006 18:43:13 +0000 (18:43 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Sat, 18 Nov 2006 18:43:13 +0000 (18:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/xrc/xmlres.cpp

index c2aa6a5586fb6c66dd94f44465d58380bbb6c964..479dbbd138ed7ed1cf6ab7f877325b4566643405 100644 (file)
@@ -1116,7 +1116,7 @@ wxBitmap wxXmlResourceHandler::GetBitmap(const wxString& param,
     wxString name = GetParamValue(param);
     if (name.empty()) return wxNullBitmap;
 #if wxUSE_FILESYSTEM
-    wxFSFile *fsfile = GetCurFileSystem().OpenFile(name);
+    wxFSFile *fsfile = GetCurFileSystem().OpenFile(name, wxFS_READ | wxFS_SEEKABLE);
     if (fsfile == NULL)
     {
         wxLogError(_("XRC resource: Cannot create bitmap from '%s'."),
@@ -1148,7 +1148,7 @@ wxAnimation wxXmlResourceHandler::GetAnimation(const wxString& param)
     wxString name = GetParamValue(param);
     if (name.empty()) return wxNullAnimation;
 #if wxUSE_FILESYSTEM
-    wxFSFile *fsfile = GetCurFileSystem().OpenFile(name);
+    wxFSFile *fsfile = GetCurFileSystem().OpenFile(name, wxFS_READ | wxFS_SEEKABLE);
     if (fsfile == NULL)
     {
         wxLogError(_("XRC resource: Cannot create animation from '%s'."),