From 534256792a468b7b85d3a656d5f17f835a3ac260 Mon Sep 17 00:00:00 2001 From: Gary Burton Date: Tue, 2 Sep 2008 19:48:38 +0000 Subject: [PATCH] Make sure new filters are found and sorting is applied when filters used in place report svn: r11010 --- src/plugins/PlaceReport.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/PlaceReport.py b/src/plugins/PlaceReport.py index f553586f2..cf412ab93 100644 --- a/src/plugins/PlaceReport.py +++ b/src/plugins/PlaceReport.py @@ -35,7 +35,6 @@ from gettext import gettext as _ # #------------------------------------------------------------------------ from PluginUtils import PluginManager, PlaceListOption, FilterOption -from Filters import CustomFilters, GenericFilter from ReportBase import Report, MenuReportOptions, \ CATEGORY_TEXT, MODE_GUI, MODE_BKI, MODE_CLI import BaseDoc @@ -80,6 +79,8 @@ class PlaceReport(Report): # Use the place handles selected without a filter self.place_handles = self.__get_place_handles(places) + self.place_handles.sort(self.sort.by_place_title) + def write_report(self): """ The routine the actually creates the report. At this point, the document @@ -225,7 +226,7 @@ class PlaceReport(Report): for place_gid in places.split(): place = self.database.get_place_from_gramps_id(place_gid) place_handles.append(place.get_handle()) - place_handles.sort(self.sort.by_place_title) + return place_handles #------------------------------------------------------------------------ @@ -248,6 +249,10 @@ class PlaceOptions(MenuReportOptions): """ category_name = _("Report Options") + # Reload filters to pick any new ones + CustomFilters = None + from Filters import CustomFilters, GenericFilter + opt = FilterOption(_("Select using filter"), 0) opt.set_help(_("Select places using a filter")) filter_list = []