]> git.mxchange.org Git - simgear.git/commitdiff
CanvasImage: rename 'file' to 'src'.
authorThomas Geymayer <tomgey@gmail.com>
Thu, 20 Mar 2014 10:42:02 +0000 (11:42 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Thu, 20 Mar 2014 10:42:02 +0000 (11:42 +0100)
simgear/canvas/elements/CanvasImage.cxx

index c201e5890d5ca9c29462085377fe80f3c0090600..84d64573144dcd36652960968c3b66358673d645 100644 (file)
@@ -520,8 +520,11 @@ namespace canvas
 
       _attributes_dirty |= DEST_SIZE;
     }
-    else if( name == "file" )
+    else if( name == "src" || name == "file" )
     {
+      if( name == "file" )
+        SG_LOG(SG_GL, SG_WARN, "'file' is deprecated. Use 'src' instead");
+
       static const std::string PROTOCOL_SEP = "://";
 
       std::string url = child->getStringValue(),
@@ -682,7 +685,7 @@ namespace canvas
       return;
 
     // Now try with MIME type
-    rw = reg->getReaderWriterForMimeType(req->responseMime());
+    rw = reg->getReaderWriterForMimeType(mime);
     if( rw && loadImage(*rw, img_data, *req, "MIME type") )
       return;