Apply referenced proxy to remove unused objects when a filter or one of the other proxies is applied.
svn: r10846
This commit is contained in:
parent
b2f0e1e537
commit
3cc07e26dd
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||||
# Copyright (C) 2008 Brian G. Matherly
|
# Copyright (C) 2008 Brian G. Matherly
|
||||||
|
# Copyright (C) 2008 Gary Burton
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -340,6 +341,12 @@ class GedcomWriter(BasicUtils.UpdateCallback):
|
|||||||
self.dbase = gen.proxy.FilterProxyDb(
|
self.dbase = gen.proxy.FilterProxyDb(
|
||||||
self.dbase, option_box.cfilter)
|
self.dbase, option_box.cfilter)
|
||||||
|
|
||||||
|
# Apply the ReferencedProxyDb to remove any objects not referenced
|
||||||
|
# after any of the other proxies have been applied
|
||||||
|
if option_box.private or option_box.restrict \
|
||||||
|
or not option_box.cfilter.is_empty():
|
||||||
|
self.dbase = gen.proxy.ReferencedProxyDb(self.dbase)
|
||||||
|
|
||||||
def write_gedcom_file(self, filename):
|
def write_gedcom_file(self, filename):
|
||||||
"""
|
"""
|
||||||
Write the actual GEDCOM file to the specfied filename.
|
Write the actual GEDCOM file to the specfied filename.
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||||
# Copyright (C) 2008 Brian G. Matherly
|
# Copyright (C) 2008 Brian G. Matherly
|
||||||
|
# Copyright (C) 2008 Gary Burton
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -93,6 +94,12 @@ def export_data(database, filename, person, option_box, callback=None):
|
|||||||
if not option_box.cfilter.is_empty():
|
if not option_box.cfilter.is_empty():
|
||||||
database = gen.proxy.FilterProxyDb(database, option_box.cfilter)
|
database = gen.proxy.FilterProxyDb(database, option_box.cfilter)
|
||||||
|
|
||||||
|
# Apply the ReferencedProxyDb to remove any objects not referenced
|
||||||
|
# after any of the other proxies have been applied
|
||||||
|
if option_box.private or option_box.restrict \
|
||||||
|
or not option_box.cfilter.is_empty():
|
||||||
|
database = gen.proxy.ReferencedProxyDb(database)
|
||||||
|
|
||||||
g = XmlWriter(database, callback, 0, compress)
|
g = XmlWriter(database, callback, 0, compress)
|
||||||
return g.write(filename)
|
return g.write(filename)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user