Skip to content

Commit

Permalink
DBManager: don't raise any errors while disconnecting signals from de…
Browse files Browse the repository at this point in the history
…stroyed objects
  • Loading branch information
brushtyler committed May 20, 2012
1 parent c2118e7 commit b4d8a5a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions python/plugins/db_manager/table_viewer.py
Expand Up @@ -67,7 +67,12 @@ def setDirty(self, val=True):

def _clear(self):
if self.item is not None:
self.disconnect(self.item, SIGNAL('aboutToChange'), self.setDirty)
try:
self.disconnect(self.item, SIGNAL('aboutToChange'), self.setDirty)
except:
# do not raise any error if self.item was deleted
pass

self.item = None
self.dirty = False

Expand All @@ -83,11 +88,13 @@ def _loadTableData(self, table):
self.setModel( table.tableDataModel(self) )

except DbError, e:
QApplication.restoreOverrideCursor()
DlgDbError.showError(e, self)
return

else:
self.update()

finally:
QApplication.restoreOverrideCursor()


Expand Down

0 comments on commit b4d8a5a

Please sign in to comment.