(XmlWriter.write_object): Use GRAMPS ID not DB handle.
svn: r3475
This commit is contained in:
parent
3fbbd73f9b
commit
6221ef70fe
@ -403,9 +403,15 @@ class XmlWriter:
|
|||||||
|
|
||||||
if len(objList) > 0:
|
if len(objList) > 0:
|
||||||
self.g.write(" <objects>\n")
|
self.g.write(" <objects>\n")
|
||||||
objList.sort ()
|
keys = self.db.get_media_object_handles()
|
||||||
for key in self.db.get_media_object_handles():
|
sorted_keys = []
|
||||||
object = self.db.get_object_from_handle(key)
|
for key in keys:
|
||||||
|
object = self.db.get_object_from_handle (key)
|
||||||
|
tuple = (object.get_gramps_id (), object)
|
||||||
|
sorted_keys.append (tuple)
|
||||||
|
|
||||||
|
sorted_keys.sort ()
|
||||||
|
for (gramps_id, object) in sorted_keys:
|
||||||
self.write_object(object)
|
self.write_object(object)
|
||||||
self.g.write(" </objects>\n")
|
self.g.write(" </objects>\n")
|
||||||
|
|
||||||
@ -772,7 +778,7 @@ class XmlWriter:
|
|||||||
self.g.write(" </placeobj>\n")
|
self.g.write(" </placeobj>\n")
|
||||||
|
|
||||||
def write_object(self,object):
|
def write_object(self,object):
|
||||||
id = object.get_handle()
|
id = object.get_gramps_id()
|
||||||
type = object.get_mime_type()
|
type = object.get_mime_type()
|
||||||
path = object.get_path()
|
path = object.get_path()
|
||||||
if self.strip_photos:
|
if self.strip_photos:
|
||||||
|
Loading…
Reference in New Issue
Block a user