svn: r20391
This commit is contained in:
parent
4b9ced7609
commit
07623a6cf1
@ -960,9 +960,29 @@ class GeoGraphyView(osmGpsMap, NavigationView):
|
||||
loc = place.get_main_location()
|
||||
oldv = (loc.get_country(), loc.get_state(), loc.get_county()) if loc else None
|
||||
places_handle = self.dbstate.db.iter_place_handles()
|
||||
nb_places = 0
|
||||
gids = ""
|
||||
for place_hdl in places_handle:
|
||||
plce = self.dbstate.db.get_place_from_handle(place_hdl)
|
||||
if plce.get_title() == place.get_title():
|
||||
nb_places += 1
|
||||
if gids == "":
|
||||
gids = plce.gramps_id
|
||||
else:
|
||||
gids = gids + ", " + plce.gramps_id
|
||||
if nb_places > 1:
|
||||
from QuestionDialog import WarningDialog
|
||||
WarningDialog(
|
||||
_('You have at least two places with the same title.'),
|
||||
_("The title of the places is :\n"
|
||||
"<b>%(title)s</b>\n"
|
||||
"The following places are similar : %(gid)s\n"
|
||||
"Eiher you rename the places either you merge them."
|
||||
"\n\n<b>I can't proceed your request</b>.\n") % {
|
||||
'title': plce.get_title(),
|
||||
'gid': gids}
|
||||
)
|
||||
else:
|
||||
self.mark = [None,None,None,None,None,None,None,
|
||||
None,None,plce.gramps_id,None,None]
|
||||
self.select_fct = PlaceSelection(self.uistate, self.dbstate, self.osm,
|
||||
|
Loading…
Reference in New Issue
Block a user