4341: Error when adding a new place

svn: r16119
This commit is contained in:
Benny Malengier 2010-11-02 18:57:13 +00:00
parent 4998f0a910
commit 0e3e420c38
6 changed files with 5 additions and 15 deletions

View File

@ -81,6 +81,11 @@ class BackRefList(EmbeddedList):
def _cleanup_local_connects(self):
self.model.disconnect(self.connectid)
def _cleanup_on_exit(self):
# model may be destroyed already in closing managedwindow
if hasattr(self, 'model'):
self.model.destroy()
def is_empty(self):
return self.model.count == 0

View File

@ -214,9 +214,6 @@ class EditEvent(EditPrimary):
self.track_ref_for_deletion("attr_list")
self.track_ref_for_deletion("backref_list")
def _cleanup_on_exit(self):
self.backref_list.close()
def build_menu_names(self, event):
return (_('Edit Event'), self.get_menu_title())

View File

@ -304,9 +304,6 @@ class EditMedia(EditPrimary):
self.callback(self.obj)
self.close()
def _cleanup_on_exit(self):
self.backref_list.close()
def data_has_changed(self):
"""
A date comparison can fail incorrectly because we have made the

View File

@ -283,9 +283,6 @@ class EditPlace(EditPrimary):
self._setup_notebook_tabs(notebook)
def _cleanup_on_exit(self):
self.backref_tab.close()
def save(self, *obj):
self.ok_button.set_sensitive(False)
if self.object_is_empty():

View File

@ -190,9 +190,6 @@ class EditRepository(EditPrimary):
self.db.transaction_commit(trans, msg)
self.close()
def _cleanup_on_exit(self):
self.backref_list.close()
class DeleteRepositoryQuery(object):
def __init__(self, dbstate, uistate, repository, sources):
self.obj = repository

View File

@ -208,9 +208,6 @@ class EditSource(EditPrimary):
self.db.transaction_commit(trans, msg)
self.close()
def _cleanup_on_exit(self):
self.backref_tab.close()
class DeleteSrcQuery(object):
def __init__(self, dbstate, uistate, source, the_lists):
self.source = source