* src/RelLib/_Place.py: Check for empty location

* src/Editors/_EditEvent.py: use default data change check


svn: r7111
This commit is contained in:
Don Allingham
2006-08-02 04:29:46 +00:00
parent e59d065ada
commit 92b1f152e1
3 changed files with 6 additions and 10 deletions

View File

@@ -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()