9314: Allow place selection both individually and by filter

Add the places selected individually to the list generated by
the filter.
This commit is contained in:
Nick Hall 2016-05-22 18:26:34 +01:00
parent 10629b16b8
commit 151677fb7e

View File

@ -107,13 +107,15 @@ class PlaceReport(Report):
self.sort = Sort(self.database) self.sort = Sort(self.database)
self.place_handles = []
if self.filter.get_name() != '': if self.filter.get_name() != '':
# Use the selected filter to provide a list of place handles # Use the selected filter to provide a list of place handles
plist = self.database.iter_place_handles() plist = self.database.iter_place_handles()
self.place_handles = self.filter.apply(self.database, plist) self.place_handles = self.filter.apply(self.database, plist)
else:
# Use the place handles selected without a filter if places:
self.place_handles = self.__get_place_handles(places) # Add places selected individually
self.place_handles += self.__get_place_handles(places)
if not self.place_handles: if not self.place_handles:
raise ReportError(_('Place Report'), raise ReportError(_('Place Report'),