* src/GrampsDb/_GrampsDbBase.py: prevent null event types and

attribute types from being added
	* src/Editors/_EditAttribute.py: prevent null attribute types
	* src/Editors/_EditEvent.py: prevent null attribute types
	* src/AutoComp.py: filter out empty strings
	* src/ImgManip.py: check for file before attempting thumbnailer


svn: r6898
This commit is contained in:
Don Allingham
2006-06-16 03:32:51 +00:00
parent 8366c12818
commit 4cf930d039
6 changed files with 35 additions and 11 deletions

View File

@@ -135,6 +135,14 @@ class EditAttribute(EditSecondary):
Called when the OK button is pressed. Gets data from the
form and updates the Attribute data structure.
"""
t = self.obj.get_type()
if t.is_custom() and str(t) == '':
from QuestionDialog import ErrorDialog
ErrorDialog(
_("Cannot save attribute"),
_("The attribute type cannot be empty"))
return
if self.callback:
self.callback(self.obj)
self.close()