aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-11-21 18:12:55 +0100
committerOlivier Tilloy <olivier@tilloy.net>2010-11-21 18:12:55 +0100
commitad55a11967171d53635e48c111f8c054ad799f9a (patch)
tree21565cf15d6e92d6c95f5e6318006078fe2e067d /src
parent3357ed0d4ffab468730c68ae9e4544209fc2eda2 (diff)
downloadpyexiv2-ad55a11967171d53635e48c111f8c054ad799f9a.tar.gz
Use the typename from the XMP datum when available
instead of relying on the static type information, that may be incomplete.
Diffstat (limited to 'src')
-rw-r--r--src/exiv2wrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp
index d217144..a5ae4aa 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -749,14 +749,14 @@ XmpTag::XmpTag(const std::string& key, Exiv2::Xmpdatum* datum): _key(key)
if (_from_datum)
{
_datum = datum;
+ _exiv2_type = datum->typeName();
}
else
{
_datum = new Exiv2::Xmpdatum(_key);
+ _exiv2_type = Exiv2::TypeInfo::typeName(Exiv2::XmpProperties::propertyType(_key));
}
- _exiv2_type = Exiv2::TypeInfo::typeName(Exiv2::XmpProperties::propertyType(_key));
-
const char* title = Exiv2::XmpProperties::propertyTitle(_key);
if (title != 0)
{