* src/RelLib/_Place.py: Check for empty location
* src/Editors/_EditEvent.py: use default data change check svn: r7111
This commit is contained in:
parent
e59d065ada
commit
92b1f152e1
@ -1,4 +1,6 @@
|
||||
2006-08-01 Don Allingham <don@gramps-project.org>
|
||||
* src/RelLib/_Place.py: Check for empty location
|
||||
* src/Editors/_EditEvent.py: use default data change check
|
||||
* src/DataViews/_PersonView.py: use grouping name
|
||||
* src/NameDisplay.py: Add grouping from data instead of just Name
|
||||
instance, handle Name.DEF
|
||||
|
@ -221,15 +221,6 @@ class EditEvent(EditPrimary):
|
||||
self.callback(self.obj)
|
||||
self.close()
|
||||
|
||||
def data_has_changed(self):
|
||||
if self.db.readonly:
|
||||
return False
|
||||
elif self.obj.handle:
|
||||
orig = self.db.get_event_from_handle(self.obj.handle)
|
||||
return cmp(orig.serialize(),self.obj.serialize()) != 0
|
||||
else:
|
||||
return True
|
||||
|
||||
class EditPersonEvent(EditEvent):
|
||||
|
||||
def __init__(self, event, dbstate, uistate, track=[], callback=None):
|
||||
|
@ -36,6 +36,8 @@ from _MediaBase import MediaBase
|
||||
from _UrlBase import UrlBase
|
||||
from _Location import Location
|
||||
|
||||
_EMPTY_LOC = Location().serialize()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Place class
|
||||
@ -89,7 +91,8 @@ class Place(PrimaryObject,SourceBase,NoteBase,MediaBase,UrlBase):
|
||||
be considered persistent.
|
||||
@rtype: tuple
|
||||
"""
|
||||
if self.main_loc == None:
|
||||
|
||||
if self.main_loc == None or self.main_loc.serialize() == _EMPTY_LOC:
|
||||
main_loc = None
|
||||
else:
|
||||
main_loc = self.main_loc.serialize()
|
||||
|
Loading…
Reference in New Issue
Block a user