Ignore TypeError on contents_size_changed cleanup
This commit is contained in:
parent
81d0d64731
commit
49699be44e
@ -169,8 +169,13 @@ class HintManager(QObject):
|
|||||||
|
|
||||||
def _cleanup(self):
|
def _cleanup(self):
|
||||||
"""Clean up after hinting."""
|
"""Clean up after hinting."""
|
||||||
self._context.tab.contents_size_changed.disconnect(
|
try:
|
||||||
self.on_contents_size_changed)
|
self._context.tab.contents_size_changed.disconnect(
|
||||||
|
self.on_contents_size_changed)
|
||||||
|
except TypeError:
|
||||||
|
# For some reason, this can fail sometimes...
|
||||||
|
pass
|
||||||
|
|
||||||
for elem in self._context.all_elems:
|
for elem in self._context.all_elems:
|
||||||
try:
|
try:
|
||||||
elem.label.remove_from_document()
|
elem.label.remove_from_document()
|
||||||
|
Loading…
Reference in New Issue
Block a user