Skip to content
Permalink
Browse files

DBManager: trap RuntimeError when disconnecting signals from a delete…

…d object
  • Loading branch information
brushtyler committed Sep 29, 2015
1 parent fea4ed9 commit ece1169a442fd4192f0fefeadbe29d5d271ee0cf
Showing with 6 additions and 2 deletions.
  1. +5 −1 python/plugins/db_manager/info_viewer.py
  2. +1 −1 python/plugins/db_manager/layer_preview.py
@@ -84,7 +84,11 @@ def setDirty(self, val=True):

def _clear(self):
if self.item is not None:
self.disconnect(self.item, SIGNAL('aboutToChange'), self.setDirty)
## skip exception on RuntimeError fixes #6892
try:
self.disconnect(self.item, SIGNAL('aboutToChange'), self.setDirty)
except RuntimeError:
pass
self.item = None
self.dirty = False

@@ -51,7 +51,7 @@ def refresh(self):
self.setDirty(True)
self.loadPreview(self.item)

def loadPreview(self, item, force=False):
def loadPreview(self, item):
if item == self.item and not self.dirty:
return
self._clear()

0 comments on commit ece1169

Please sign in to comment.
You can’t perform that action at this time.